E-MailRelay
|
A monotonically increasing subsecond-resolution timestamp, notionally unrelated to time_t. More...
#include <gdatetime.h>
Public Member Functions | |
bool | isZero () const noexcept |
Returns true if zero(). More... | |
bool | sameSecond (const TimerTime &other) const |
Returns true if this time and the other time are the same, at second resolution. More... | |
bool | operator< (const TimerTime &) const |
Comparison operator. More... | |
bool | operator<= (const TimerTime &) const |
Comparison operator. More... | |
bool | operator== (const TimerTime &) const |
Comparison operator. More... | |
bool | operator!= (const TimerTime &) const |
Comparison operator. More... | |
bool | operator> (const TimerTime &) const |
Comparison operator. More... | |
bool | operator>= (const TimerTime &) const |
Comparison operator. More... | |
TimerTime | operator+ (const TimeInterval &) const |
Returns this time with given interval added. More... | |
void | operator+= (TimeInterval) |
Adds an interval. More... | |
TimeInterval | operator- (const TimerTime &start) const |
Returns the given start time's interval() compared to this end time. More... | |
TimeInterval | interval (const TimerTime &end) const |
Returns the interval between this time and the given end time. More... | |
Static Public Member Functions | |
static TimerTime | now () |
Factory function for the current steady-clock time. More... | |
static TimerTime | zero () |
Factory function for the start of the epoch. More... | |
Friends | |
class | G::DateTimeTest |
A monotonically increasing subsecond-resolution timestamp, notionally unrelated to time_t.
Definition at line 212 of file gdatetime.h.
G::TimeInterval G::TimerTime::interval | ( | const TimerTime & | end | ) | const |
Returns the interval between this time and the given end time.
Returns TimeInterval::zero() on underflow or TimeInterval::limit() if the TimeInterval::s_type value overflows.
Definition at line 440 of file gdatetime.cpp.
|
inlinenoexcept |
Returns true if zero().
Definition at line 279 of file gdatetime.h.
|
static |
Factory function for the current steady-clock time.
Definition at line 385 of file gdatetime.cpp.
bool G::TimerTime::operator!= | ( | const TimerTime & | other | ) | const |
Comparison operator.
Definition at line 468 of file gdatetime.cpp.
G::TimerTime G::TimerTime::operator+ | ( | const TimeInterval & | interval | ) | const |
Returns this time with given interval added.
Definition at line 419 of file gdatetime.cpp.
void G::TimerTime::operator+= | ( | TimeInterval | i | ) |
Adds an interval.
Definition at line 427 of file gdatetime.cpp.
G::TimeInterval G::TimerTime::operator- | ( | const TimerTime & | start | ) | const |
Returns the given start time's interval() compared to this end time.
Returns TimeInterval::zero() on underflow or TimeInterval::limit() if the TimeInterval::s_type value overflows.
Definition at line 435 of file gdatetime.cpp.
bool G::TimerTime::operator< | ( | const TimerTime & | other | ) | const |
Comparison operator.
Definition at line 453 of file gdatetime.cpp.
bool G::TimerTime::operator<= | ( | const TimerTime & | other | ) | const |
Comparison operator.
Definition at line 458 of file gdatetime.cpp.
bool G::TimerTime::operator== | ( | const TimerTime & | other | ) | const |
Comparison operator.
Definition at line 463 of file gdatetime.cpp.
bool G::TimerTime::operator> | ( | const TimerTime & | other | ) | const |
Comparison operator.
Definition at line 473 of file gdatetime.cpp.
bool G::TimerTime::operator>= | ( | const TimerTime & | other | ) | const |
Comparison operator.
Definition at line 478 of file gdatetime.cpp.
bool G::TimerTime::sameSecond | ( | const TimerTime & | other | ) | const |
Returns true if this time and the other time are the same, at second resolution.
Definition at line 445 of file gdatetime.cpp.
|
static |
Factory function for the start of the epoch.
Definition at line 390 of file gdatetime.cpp.
|
friend |
Definition at line 265 of file gdatetime.h.