nCine::Timer class

Accumulates the time between starting and stopping the time measurement.

Public static functions

static void sleep(std::uint32_t milliseconds)
Puts the current thread to sleep for the specified number of milliseconds.

Constructors, destructors, conversion operators

Timer()

Public functions

void start()
Starts the timer.
void stop()
Stops the timer.
void reset()
Resets the accumulated time.
auto isRunning() const -> bool
Returns true if the timer is running.
auto interval() const -> float
Returns elapsed time in seconds since last starting the timer.
auto total() const -> float
Returns total accumulated time in seconds.