Tag: fmt
-
fmt format %H:%M:%S without decimals
7 I am trying to format a std::chrono::duration object to the format HH:MM::SS, e.g. 16:42:02 being the hours (16), the minutes (42), and the seconds (2). the library fmt offers useful formatting specifiers for this: using namespace std::chrono; auto start = high_resolution_clock::now(); auto end = start + 4s; fmt::print("{:%H:%M:%S} n", end); which unfortuantely prints the…