Open Lighting Architecture
Latest Git
|
Used to get the current time.
Public Member Functions | |
virtual void | CurrentMonotonicTime (TimeStamp *timestamp) const |
Sets timestamp to the current monotonic time. More... | |
virtual void | CurrentRealTime (TimeStamp *timestamp) const |
Sets timestamp to the current real time. More... | |
virtual 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 in ola::MockClock.
|
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 in ola::MockClock.
|
virtual |
Wrapper around CurrentRealime.
[out] | timestamp | A TimeStamp pointer |
Reimplemented in ola::MockClock.