MCPcopy Create free account
hub / github.com/apache/impala / FormatTimestampForLog

Function FormatTimestampForLog

be/src/kudu/util/logging.cc:350–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350std::string FormatTimestampForLog(MicrosecondsInt64 micros_since_epoch) {
351 time_t secs_since_epoch = micros_since_epoch / 1000000;
352 size_t usecs = micros_since_epoch % 1000000;
353 struct tm tm_time;
354 localtime_r(&secs_since_epoch, &tm_time);
355
356 return StringPrintf("%02d%02d %02d:%02d:%02d.%06ld",
357 1 + tm_time.tm_mon,
358 tm_time.tm_mday,
359 tm_time.tm_hour,
360 tm_time.tm_min,
361 tm_time.tm_sec,
362 usecs);
363}
364
365void ShutdownLoggingSafe() {
366 SpinLockHolder l(&logging_mutex);

Callers 1

DumpMethod · 0.85

Calls 1

StringPrintfFunction · 0.85

Tested by

no test coverage detected