27 struct tm *
LT = ::localtime_r(&OurTime, &Storage);
29 char Buffer1[
sizeof(
"YYYY-MM-DD HH:MM:SS")];
30 strftime(Buffer1,
sizeof(Buffer1),
"%Y-%m-%d %H:%M:%S", LT);
31 char Buffer2[
sizeof(
"YYYY-MM-DD HH:MM:SS.MMMUUUNNN")];
32 snprintf(Buffer2,
sizeof(Buffer2),
"%s.%.9u", Buffer1, this->
nanoseconds());
33 return std::string(Buffer2);
37 struct timeval the_time;
38 timerclear(&the_time);
39 if (0 != ::gettimeofday(&the_time,
nullptr)) {
48 static_cast<TimeValue::SecondsType>( the_time.tv_sec +
49 PosixZeroTimeSeconds ),
50 static_cast<TimeValue::NanoSecondsType>( the_time.tv_usec *
std::string str() const
Provides conversion of the TimeValue into a readable time & date.
TimeValue()
Default construct a time value, initializing to ZeroTime.
static TimeValue now()
This is a static constructor that returns a TimeValue that represents the current time...
static TimeValue MinTime()
A constant TimeValue representing the smallest time value permissible by the class.
NanoSecondsType nanoseconds() const
Returns only the nanoseconds component of the TimeValue.
uint64_t toEpochTime() const
Converts the TimeValue into the corresponding number of seconds since the epoch (00:00:00 Jan 1...