29 int rc = ::gettimeofday( &tv ,
nullptr ) ;
31 throw std::runtime_error(
"gettimeofday failed" ) ;
32 return EpochTime( tv.tv_sec , tv.tv_usec ) ;
35 std::tm * G::DateTime::gmtime_imp(
const std::time_t * t , std::tm * p )
37 return ::gmtime_r(t,p) ;
40 std::tm * G::DateTime::localtime_imp(
const std::time_t * t , std::tm * p )
42 return ::localtime_r(t,p) ;
A subsecond-resolution timestamp based on a time_t.
static EpochTime now()
Returns the current epoch time.