|
AGX Dynamics 2.42.3.0
|
The HighAccurayTimer class can replace the regular Timer class in high level applications where the need for accuracy is greater than performance. More...
#include <HighAccuracyTimer.h>
Public Member Functions | |
| HighAccuracyTimer (bool startImmediately=false) | |
| Creates a HighAccuracyTimer. | |
| Real64 | getTime () const |
| Report total elapsed time since start in milliseconds, excluding intervals when the timer was suspended. | |
| bool | isRunning () const |
| Return true if running. | |
| void | reset (bool startAfterReset=false) |
| Clear all data and optionally restart the timer. | |
| void | start () |
| Starts the HighAccuracyTimer. | |
| void | stop () |
| Stops the HighAccuracyTimer. | |
The HighAccurayTimer class can replace the regular Timer class in high level applications where the need for accuracy is greater than performance.
This timer is based upon std::chrono::high_resolution_clock. This timer should primarily be used with low calling frequency, such as when measuring total computation time.
Definition at line 37 of file HighAccuracyTimer.h.
|
inline |
Creates a HighAccuracyTimer.
| startImmediately | Should the HighAccuracyTimer start immediately or start in stopped mode |
Definition at line 86 of file HighAccuracyTimer.h.
| Real64 agx::HighAccuracyTimer::getTime | ( | ) | const |
Report total elapsed time since start in milliseconds, excluding intervals when the timer was suspended.
Definition at line 133 of file HighAccuracyTimer.h.
| bool agx::HighAccuracyTimer::isRunning | ( | ) | const |
Return true if running.
Definition at line 127 of file HighAccuracyTimer.h.
| void agx::HighAccuracyTimer::reset | ( | bool | startAfterReset = false | ) |
Clear all data and optionally restart the timer.
Definition at line 117 of file HighAccuracyTimer.h.
References start().
Referenced by HighAccuracyTimer().
| void agx::HighAccuracyTimer::start | ( | ) |
Starts the HighAccuracyTimer.
Calling start on a already started HighAccuracyTimer will have no effect.
Definition at line 94 of file HighAccuracyTimer.h.
Referenced by HighAccuracyTimer(), and reset().
| void agx::HighAccuracyTimer::stop | ( | ) |
Stops the HighAccuracyTimer.
Calling stop on a already stopped HighAccuracyTimer will have no effect. Upon stopping, the amount of cycles and time ran will be updated.
Definition at line 105 of file HighAccuracyTimer.h.
References agx::end().