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

Function PrintRealDateTime

src/brpc/builtin/common.cpp:96–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96void 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, &lt));
101 const char old_fill = os.fill('0');
102 os << buf << std::setw(6) << tm % 1000000L;
103 os.fill(old_fill);
104}
105
106void PrintRealDateTime(std::ostream& os, int64_t tm,
107 bool ignore_microseconds) {

Callers 5

common.cppFile · 0.85
default_methodMethod · 0.85
PrintConnectionsMethod · 0.85
PrintServerSpanFunction · 0.85
default_methodMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected