DoxigAlpha

Timer

A monotonic, high performance timer.

Timer.start() is used to initialize the timer and gives the caller an opportunity to check for the existence of a supported clock. Once a supported clock is discovered, it is assumed that it will be available for the duration of the Timer's use.

Monotonicity is ensured by saturating on the most previous sample. This means that while timings reported are monotonic, they're not guaranteed to tick at a steady rate as this is up to the underlying system.

Fields of this type

Fields

#

Initialize the timer by querying for a supported clock.

Functions

#
start
Initialize the timer by querying for a supported clock.
read
Reads the timer value since start or the last reset in nanoseconds.
reset
Resets the timer value to 0/now.
lap
Returns the current value of the timer in nanoseconds, then resets it.

Error sets in this namespace

Error Sets

#