Class CpuTimer

Class Documentation

class CpuTimer

Tracks elapsed CPU time using std::clock.

Public Functions

inline CpuTimer()

Constructor.

inline void reset()

Reset the timer.

inline double elapsed_seconds() const

Get elapsed CPU time in seconds since initialization or last reset.

Returns:

CPU time in seconds

inline double elapsed_milliseconds() const

Get elapsed CPU time in milliseconds since initialization or last reset.

Returns:

CPU time in milliseconds

Public Static Attributes

static bool const uses_thread_clock = false

Whether the timer uses a thread clock (i.e. provides proper, thread-specific CPU time).