1 #ifndef _utl_TimeStamp_h_
2 #define _utl_TimeStamp_h_
7 #include <utl/AugerUnits.h>
120 void SetGPSTime(
const unsigned long sec,
const double nsec = 0)
203 #include <utl/AugerUnits.h>
204 #include <utl/TimeInterval.h>
TimeInterval operator-(const TimeStamp &ts) const
[TimeStamp] - [TimeStamp] = [TimeInterval]
TimeStamp & operator-=(const TimeInterval &ti)
[TimeStamp] -= [TimeInterval] = [TimeStamp]
long GetSecond() const
Get the seconds floor for the interval.
A TimeStamp holds GPS second and nanosecond for some event.
Stream & operator<<(Stream &s, MessageLoggerConfig &mlc)
Applies the configuration to the given stream.
void SetGPSTime(const unsigned long sec, const double nsec=0)
Set GPS second and (optionally) nanosecond.
bool operator>(const TimeStamp &ts) const
constexpr double nanosecond
bool operator<=(const TimeStamp &ts) const
void SetNormalized(long sec, double nsec)
Take care of positive nanosecond and GPS epoch.
bool operator!=(const TimeStamp &ts) const
bool operator==(const TimeStamp &ts) const
bool operator>=(const TimeStamp &ts) const
A TimeInterval is used to represent time elapsed between two events.
unsigned long GetGPSSecond() const
GPS second.
double GetGPSNanoSecond() const
GPS nanosecond.
TimeStamp GetCurrentSystemTime()
get current time as reported by system
bool operator<(const TimeStamp &ts) const
TimeStamp operator+(const TimeInterval &ti) const
[TimeStamp] + [TimeInterval] = [TimeStamp]
double GetNanoSecond() const
Get integer number of nanoseconds past seconds boundary.
TimeStamp & operator+=(const TimeInterval &ti)
[TimeStamp] += [TimeInterval] = [TimeStamp]
TimeStamp(const long sec, const double nsec=0)
Construct from GPS second and nanosecond.