#include <evo/timer.h>
template<class T = TimerStampWall>
class evo::TimerT< T >
Timer that works like a stopwatch.
- Use Timer or TimerCpu
- Accuracy depends on the system and hardware
◆ This
◆ TimerT() [1/2]
◆ TimerT() [2/2]
Copy constructor.
- Parameters
-
◆ active()
Get whether timer is active (started).
- Returns
- Whether active, false if not started
◆ clear()
◆ msec()
Get current time elapsed in milliseconds.
- If timer is active then this gives time elapsed so far, otherwise time elapsed from last start/stop
- Returns
- Time elapsed in milliseconds
◆ nsec()
Get current time elapsed in nanoseconds.
- If timer is active then this gives time elapsed so far, otherwise time elapsed from last start/stop
- Returns
- Time elapsed in nanoseconds
◆ operator=()
Assignment/Copy operator.
- Parameters
-
- Returns
- This
◆ resume()
Resume timer from last stop.
- This starts timer again like a stopwatch
- If timer never started then this is same as start()
- Call stop() to stop timer
◆ sec()
Get current time elapsed in floating-point seconds (with fraction).
- If timer is active then this gives time elapsed so far, otherwise time elapsed from last start/stop
- Returns
- Time elapsed in seconds
◆ start()
Start timer.
- This clears stored elapsed time
- Call stop() to stop timer
◆ stop()
Stop timer.
- Time elapsed is stored internally
- Timer may started again with start() or resume()
◆ usec()
Get current time elapsed in microseconds.
- If timer is active then this gives time elapsed so far, otherwise time elapsed from last start/stop
- Returns
- Time elapsed in microseconds
The documentation for this class was generated from the following file: