35 return double(LargeInt.tv_sec) + double(LargeInt.tv_nsec) / 1e9;
41 if (! ( TimeS < 4e9 && TimeS > 0.0 ))
44 DeltaTime.tv_nsec = 0;
48 DeltaTime.tv_sec = ::time_t(TimeS);
50 =
static_cast<long int>((TimeS - double(DeltaTime.tv_sec)) * 1e9);
62 if (Res.tv_nsec < 0) {
64 Res.tv_nsec += 1000000000;
124 # define TIME_SIZE 400 133 tm = localtime ( &now );
134 len = strftime ( pres,
TIME_SIZE,
"%Y-%m-%d %H:%M:%S.", tm );
144 # define TIME_SIZE 4000 153 len = strftime ( pres,
TIME_SIZE,
"%Y-%m-%d %H:%M:%S.", tm );
void setTimeStamp(const long &lSeconds, const long &lNanoSeconds)
timespec m_TimeStamp
Internal time stamp data.
void operator-=(double TimeS)
Reduces the timestamp by TimeS seconds.
void getTimeStamp(long &lSeconds, long &lNanoSeconds)
void SetNow()
Makes time measurement.
void operator+=(double TimeS)
Increase the timestamp by TimeS seconds.
bool operator>(const TimeStamp &Time)
Checks if this time is after time "Time".
bool operator<(const TimeStamp &Time)
Checks if this time is before time "Time".
std::string CurrentToString()
std::string NumToString(const int n)
double operator-(const TimeStamp &EarlierTime) const
Retrieves time difference in seconds.
static double TimespecToDouble(const ::timespec &LargeInt)
Conversion timespec -> double.
::timespec DoubleToTimespec(double TimeS)
Conversion double -> timespec.