![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Core/Timer.h>
Stopwatch class to measure execution time. More...
Stopwatch class to measure execution time.
If you're looking for a class to execute actions repetitively, use Threading::PlaybackTimer.
Public Member Functions | |
Timer (bool start=true) | |
Constructor, starting timer right away by default. | |
void | start () |
Start timer. | |
void | stop () |
Stop timer. | |
void | pause () |
Pause timer. | |
void | resume () |
Resume timer from both stopped or paused. | |
void | reset () |
Stop and reset timer. | |
void | restart () |
Reset and restart the timer. | |
bool | isRunning () const |
Returns if the timer is currently running. | |
bool | isPaused () const |
Returns if the timer is currently paused. | |
double | getPassedMs () |
Return elapsed time in ms. | |
double | getPassedMsAndReset () |
Return elapsed time in ms and reset the timer. | |
std::string | formatPassed () |
Return elapsed time as human-readable string. | |
std::string | formatPassedAndReset () |
Return elapsed time as human-readable and reset the timer. | |
Static Public Member Functions | |
static void | sleep (int ms) |
Sleep for specified period in ms. | |