| 94 | } |
| 95 | |
| 96 | void PrintRealDateTime(std::ostream& os, int64_t tm) { |
| 97 | char buf[32]; |
| 98 | const time_t tm_s = tm / 1000000L; |
| 99 | struct tm lt; |
| 100 | strftime(buf, sizeof(buf), "%Y/%m/%d-%H:%M:%S.", localtime_r(&tm_s, <)); |
| 101 | const char old_fill = os.fill('0'); |
| 102 | os << buf << std::setw(6) << tm % 1000000L; |
| 103 | os.fill(old_fill); |
| 104 | } |
| 105 | |
| 106 | void PrintRealDateTime(std::ostream& os, int64_t tm, |
| 107 | bool ignore_microseconds) { |
no outgoing calls
no test coverage detected