class Timer

Timer class used for querying high precision timers.

Public

Constructors

Timer

Timer()

Construct the timer and start timing.

Methods

Reset

void Reset()

Reset the timer to zero.

GetMilliseconds

u64 GetMilliseconds() const

Returns time in milliseconds since timer was initialized or last reset.

GetMicroseconds

u64 GetMicroseconds() const

Returns time in microseconds since timer was initialized or last reset.

GetStartMs

u64 GetStartMs() const

Returns the time at which the timer was initialized, in milliseconds.

Returns: Time in milliseconds.

Private

Fields

mHRClock

std::chrono::high_resolution_clock mHRClock

mStartTime

std::chrono::time_point<std::chrono::high_resolution_clock> mStartTime