Tesseract
Motion Planning Environment
|
A simple timer class leveraging chrono high resolution clock. More...
#include <timer.h>
Public Member Functions | |
void | start () |
Start the timer. More... | |
void | stop () |
Stop the timer. More... | |
double | elapsedMilliseconds () const |
Get the elapsed time in milliseconds. More... | |
double | elapsedSeconds () const |
Get the elapsed time in seconds. More... | |
Private Types | |
using | Clock = std::chrono::high_resolution_clock |
Private Attributes | |
std::chrono::time_point< Clock > | start_time_ |
std::chrono::time_point< Clock > | end_time_ |
bool | running_ { false } |
A simple timer class leveraging chrono high resolution clock.
|
private |
|
inline |
Get the elapsed time in milliseconds.
If timer is actively running it will use Clock::now() as the end time
|
inline |
Get the elapsed time in seconds.
If timer is actively running it will use Clock::now() as the end time
|
inline |
Start the timer.
|
inline |
Stop the timer.
|
private |
|
private |
|
private |