Basic monotonic clock & timer. More...
Classes | |
class | MonotonicError |
Low-level monotonic clock error. More... | |
Public Member Functions | |
Monotonic (bool systemTime=false) | |
Default constructor. More... | |
Monotonic (const Monotonic &t) | |
Copy constructor. More... | |
~Monotonic () | |
Destructor. | |
void | getSystemTime () |
Load this object with the current system time. | |
bool | operator!= (const Monotonic &t) const |
Comparison operator. More... | |
Monotonic & | operator+= (const NanoSecond &ns) |
Increment operator. More... | |
NanoSecond | operator- (const Monotonic &t) const |
Difference operator. More... | |
Monotonic & | operator-= (const NanoSecond &ns) |
Decrement operator. More... | |
bool | operator< (const Monotonic &t) const |
Comparison operator. More... | |
bool | operator<= (const Monotonic &t) const |
Comparison operator. More... | |
Monotonic & | operator= (const Monotonic &t) |
Assigment operator. More... | |
bool | operator== (const Monotonic &t) const |
Comparison operator. More... | |
bool | operator> (const Monotonic &t) const |
Comparison operator. More... | |
bool | operator>= (const Monotonic &t) const |
Comparison operator. More... | |
void | wait () |
Wait until the time of the monotonic clock. | |
Static Public Member Functions | |
static NanoSecond | SetPrecision (const NanoSecond &precision) |
This static method requests a minimum resolution, in nano-seconds, for the timers. More... | |
Basic monotonic clock & timer.
ts::Monotonic::Monotonic | ( | bool | systemTime = false | ) |
Default constructor.
[in] | systemTime | If true, initialize with current system time. |
ts::Monotonic::Monotonic | ( | const Monotonic & | t | ) |
Copy constructor.
[in] | t | Another instance to copy. |
Assigment operator.
[in] | t | Another instance to copy. |
|
inline |
Comparison operator.
[in] | t | Another instance to compare. |
|
inline |
Comparison operator.
[in] | t | Another instance to compare. |
|
inline |
Comparison operator.
[in] | t | Another instance to compare. |
|
inline |
Comparison operator.
[in] | t | Another instance to compare. |
|
inline |
Comparison operator.
[in] | t | Another instance to compare. |
|
inline |
Comparison operator.
[in] | t | Another instance to compare. |
|
inline |
Increment operator.
[in] | ns | A number of nanoseconds to add. |
|
inline |
Decrement operator.
[in] | ns | A number of nanoseconds to substract. |
|
inline |
Difference operator.
[in] | t | Another instance. |
|
static |
This static method requests a minimum resolution, in nano-seconds, for the timers.
[in] | precision | Requested minimum resolution in nano-seconds. |