MCPcopy Create free account
hub / github.com/apache/brpc / PrintRealTime

Function PrintRealTime

src/brpc/builtin/rpcz_service.cpp:159–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159inline 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, &lt));
164 const char old_fill = os.fill('0');
165 os << buf << std::setw(6) << tm % 1000000L;
166 os.fill(old_fill);
167}
168
169static void PrintElapse(std::ostream& os, int64_t cur_time,
170 int64_t* last_time) {

Callers 2

PrintAnnotationsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected