41 assert((ratio_less_equal<chrono::system_clock::duration::period, chrono::nanoseconds::period>::value));
42 return (int64_t)chrono::duration_cast<chrono::nanoseconds>(chrono::system_clock::now().time_since_epoch()).count();
46 auto now = chrono::system_clock::now();
47 return out << chrono::duration_cast<chrono::seconds>(now.time_since_epoch()).count() <<
'.'<< setw(9) << setfill(
'0') << (chrono::duration_cast<chrono::nanoseconds>(now.time_since_epoch()).count() % 1000000000LL);
51 time_t timegm(
struct tm *t) {
75 return (tl - (tb - tl));
Compatibility Macros for C/C++.
Time related declarations.
ostream & hires_ts(ostream &out)
Prints the current time as seconds and nanoseconds, delimited by '.'.
int64_t get_ts64()
Returns the current time in nanoseconds as a 64bit number.