nCine::Timer class

Stopwatch that accumulates elapsed time across start/stop intervals.

Each /@ref stop() pair adds its duration to a running total that can be queried with total(). interval() reports the time since the most recent start().

Constructors, destructors, conversion operators

Timer()

Public functions

void start()
Starts the timer.
void stop()
Stops the timer and adds the elapsed interval to the accumulated time.
void reset()
Resets the accumulated time to zero.
auto isRunning() const -> bool
Returns true if the timer is currently running.
auto interval() const -> float
Returns the time in seconds elapsed since the last call to start().
auto total() const -> float
Returns the total accumulated time in seconds across all intervals.