Open Lighting Architecture
Latest Git
|
A Mock Clock used for testing.
Public Member Functions | |
void | AdvanceTime (const TimeInterval &interval) |
void | AdvanceTime (int32_t sec, int32_t usec) |
void | CurrentMonotonicTime (TimeStamp *timestamp) const |
Sets timestamp to the current monotonic time. More... | |
void | CurrentRealTime (TimeStamp *timestamp) const |
Sets timestamp to the current real time. More... | |
void | CurrentTime (TimeStamp *timestamp) const |
Wrapper around CurrentRealime. More... | |
|
virtual |
Sets timestamp to the current monotonic time.
The timestamp parameter will be set to the current monotonic time only if the system has a monotonic clock available. If a monotonic clock is unavailable, this method will fallback to CurrentRealTime.
The system's monotonic clock is not subject to discontinuous jumps due to administrative action, but may be affected by incremental adjustment due to time synchronization protocol e.g. NTP. The monotonic clock does not advance while the system is suspended. An appropriate use of this method is to measure elapsed time.
[out] | timestamp | A TimeStamp pointer |
Reimplemented from ola::Clock.
|
virtual |
Sets timestamp to the current real time.
The timestamp parameter will be set to the current real i.e. wall-clock time.
The system's realtime clock is subject to discontinuous and incremental adjustment due to administrative action or time synchronization protocol e.g. NTP. An appropriate use of this method is to display a user-facing timestamp.
[out] | timestamp | A TimeStamp pointer |
Reimplemented from ola::Clock.
|
virtual |
Wrapper around CurrentRealime.
[out] | timestamp | A TimeStamp pointer |
Reimplemented from ola::Clock.