Timer class
#include <nCine/Base/Timer.h>
Stopwatch that accumulates elapsed time across start/stop intervals.
Each /
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
trueif 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.