This class provides an interface into system dependent steady, monotonic timer values, which are independent of the system's clock settings, hence independent of 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 converting 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 (const lang::Initialization init=lang::Initialization::Default) |
constexpr | TimePointBase (TTimePoint internalValue) |
Duration | Age () const |
TTimePoint | Export () const |
void | Import (TTimePoint timePoint) |
bool | IsOlderThan (const Duration &timeSpan) const |
bool | IsSet () |
Ticks | operator+ (const Duration &timeSpan) const |
Ticks | operator+ (const typename Duration::TDuration &timeSpan) const |
Ticks | operator+= (const Duration &timeSpan) |
Ticks | operator+= (const typename Duration::TDuration &timeSpan) |
Ticks | operator- (const Duration &timeSpan) const |
Duration | operator- (const Ticks &other) const |
Ticks | operator- (const typename Duration::TDuration &timeSpan) const |
Ticks | operator-= (const Duration &timeSpan) |
Ticks | operator-= (const typename Duration::TDuration &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 |
Integral type used for exporting and importing values in raw units. | |
using | TTimePoint |
The internal c++ type for time points. | |
Public Static Method Index: inherited from TimePointBase< std::chrono::steady_clock, Ticks > | |
static Ticks | BeginningOfEpoch () |
static Ticks | EndOfEpoch () |
static Ticks | FromRaw (TRaw raw) |
static Ticks | Now () |
Protected Field Index: inherited from TimePointBase< std::chrono::steady_clock, Ticks > | |
TTimePoint | stamp |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |