Timer class
#include <nCine/Base/Timer.h>
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
trueif the timer is currently running. - auto GetInterval() const -> float
- Returns the time in seconds elapsed since the last call to start().
- auto GetTotal() const -> float
- Returns the total accumulated time in seconds across all intervals.