This class provides an interface into system dependent steady, monotonic timer values, which are independent from the system's clock settings, hence independent from changes of the clock by the user, by external clock synchronization using the internet, GPS, mobile network, etc.
Usually, this class is used to measure and store durations (e.g. with inherited method Age ). As tick values are not just system dependent, but even usually change with a reboot of a system, they should not be stored and loaded in data files or otherwise shared between systems.
In contrast to sibling type DateTime , this class is also missing conversion methods with types that represent "human" calendar dates and a clock times. However, in some situations it still may be needed to convert the points in time measured with this class to human readable date and time representations. For this purpose, class TickConverter allows to convert objects of this type to objects of sibling type DateTime, which then can be further converted to system-dependent calendar dates and clock times.
The class has no specific interface, but the methods and operators inherited from base TimePointBase .
#include <ticks.hpp>
Public Method Index: | |
bool | operator!= (const Ticks &other) const |
bool | operator< (const Ticks &other) const |
bool | operator<= (const Ticks &other) const |
bool | operator== (const Ticks &other) const |
bool | operator> (const Ticks &other) const |
bool | operator>= (const Ticks &other) const |
Public Method Index: inherited from TimePointBase< std::chrono::steady_clock, Ticks > | |
constexpr | TimePointBase (lang::Initialization init=lang::Initialization::Perform) |
constexpr | TimePointBase (TTimePoint internalValue) |
Duration | Age () const |
TTimePoint | Export () const |
void | Import (TTimePoint timePoint) |
bool | IsOlderThan (Duration timeSpan) const |
bool | IsSet () |
Ticks | operator+ (const Duration &timeSpan) const |
Ticks | operator+= (const Duration &timeSpan) |
Ticks | operator- (const Duration &timeSpan) const |
Duration | operator- (const Ticks &other) const |
Ticks | operator-= (const Duration &timeSpan) |
Ticks & | Reset () |
void | SetAs (const Ticks &other) |
void | SetFromRaw (TRaw raw) |
Duration | Since (const Ticks &other) const |
TRaw | ToRaw () const |
void | Unset () |
Additional Inherited Members | |
Public Type Index: inherited from TimePointBase< std::chrono::steady_clock, Ticks > | |
using | TRaw |
using | TTimePoint |
Public Static Method Index: inherited from TimePointBase< std::chrono::steady_clock, Ticks > | |
static Ticks | FromRaw (TRaw raw) |
static Ticks | Now () |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |