MCPcopy Create free account
hub / github.com/dobin/RedEdr / write_date_time

Function write_date_time

RedEdrShared/loguru.cpp:691–701  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689 }
690
691 void write_date_time(char* buff, unsigned long long buff_size)
692 {
693 auto now = system_clock::now();
694 long long ms_since_epoch = duration_cast<milliseconds>(now.time_since_epoch()).count();
695 time_t sec_since_epoch = time_t(ms_since_epoch / 1000);
696 tm time_info;
697 localtime_r(&sec_since_epoch, &time_info);
698 snprintf(buff, buff_size, "%04d%02d%02d_%02d%02d%02d.%03lld",
699 1900 + time_info.tm_year, 1 + time_info.tm_mon, time_info.tm_mday,
700 time_info.tm_hour, time_info.tm_min, time_info.tm_sec, ms_since_epoch % 1000);
701 }
702
703 const char* argv0_filename()
704 {

Callers 1

suggest_log_pathFunction · 0.85

Calls 1

countMethod · 0.80

Tested by

no test coverage detected