Description
Chrono wrappers for the high-resolution timer.
#include <ChTimer.h>
Public Member Functions | |
void | start () |
Start the timer. | |
void | stop () |
Stop the timer. More... | |
void | reset () |
Reset the total accumulated time (when repeating multiple start/stop). | |
unsigned long long | GetTimeMilliseconds () const |
Return the time in milliseconds. More... | |
unsigned long long | GetTimeMicroseconds () const |
Return the time in microseconds. More... | |
double | GetTimeSeconds () const |
Return the time in seconds. More... | |
double | operator() () const |
Get the last timer value, in seconds. | |
Member Function Documentation
◆ GetTimeMicroseconds()
|
inline |
Return the time in microseconds.
If the timer was started but not stopped, this function returns the intermediate value and the timer keeps running. Otherwise, it returns the timer value when it was stopped.
◆ GetTimeMilliseconds()
|
inline |
Return the time in milliseconds.
If the timer was started but not stopped, this function returns the intermediate value and the timer keeps running. Otherwise, it returns the total accumulated time when the timer was last stopped.
◆ GetTimeSeconds()
|
inline |
Return the time in seconds.
If the timer was started but not stopped, this function returns the intermediate value and the timer keeps running. Otherwise, it returns the timer value when it was stopped.
◆ stop()
|
inline |
Stop the timer.
The current duration from the last time the timer was stopped is added to the accumulated time. Call reset() to zero out the accumulated time.
The documentation for this class was generated from the following file:
- /builds/uwsbel/chrono/src/chrono/core/ChTimer.h