| 157 | } |
| 158 | |
| 159 | inline void PrintRealTime(std::ostream& os, int64_t tm) { |
| 160 | char buf[16]; |
| 161 | const time_t tm_s = tm / 1000000L; |
| 162 | struct tm lt; |
| 163 | strftime(buf, sizeof(buf), "%H:%M:%S.", localtime_r(&tm_s, <)); |
| 164 | const char old_fill = os.fill('0'); |
| 165 | os << buf << std::setw(6) << tm % 1000000L; |
| 166 | os.fill(old_fill); |
| 167 | } |
| 168 | |
| 169 | static void PrintElapse(std::ostream& os, int64_t cur_time, |
| 170 | int64_t* last_time) { |
no outgoing calls
no test coverage detected