Clock

Utility class that measures the elapsed time.

Clock is a lightweight class for measuring time.

Its provides the most precise time that the underlying OS can achieve (generally microseconds or nanoseconds). It also ensures monotonicity, which means that the returned time can never go backward, even if the system time is changed.

Constructors

this
this()

Default constructor.

Destructor

~this
~this()

Destructor

Members

Aliases

MonoTime
alias MonoTime = TickDuration
Undocumented in source.
currTime
alias currTime = TickDuration.currSystemTick
Undocumented in source.
currTime
alias currTime = MonoTime.currTime
Undocumented in source.

Functions

getElapsedTime
Duration getElapsedTime()

Get the elapsed time.

restart
Duration restart()

Restart the clock.

Variables

m_startTime
MonoTime m_startTime;
Undocumented in source.

Meta