Implementation of timing for use with unit tests that control time manually.
#include <drake/common/timer.h>
Public Member Functions | |
ManualTimer () | |
~ManualTimer () final | |
void | Start () final |
Begins timing. Call Start every time you want to reset the timer to zero. More... | |
double | Tick () final |
Obtains a timer measurement in seconds. More... | |
void | set_tick (double tick) |
Sets the return value of Tick(). More... | |
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable | |
ManualTimer (const ManualTimer &)=default | |
ManualTimer & | operator= (const ManualTimer &)=default |
ManualTimer (ManualTimer &&)=default | |
ManualTimer & | operator= (ManualTimer &&)=default |
Public Member Functions inherited from Timer | |
Timer ()=default | |
Properly implemented Timers must start timing upon construction. More... | |
virtual | ~Timer () |
Additional Inherited Members | |
Protected Member Functions inherited from Timer | |
Timer (const Timer &)=default | |
Timer & | operator= (const Timer &)=default |
Timer (Timer &&)=default | |
Timer & | operator= (Timer &&)=default |
|
default |
|
default |
ManualTimer | ( | ) |
|
final |
|
default |
|
default |
|
finalvirtual |
Begins timing. Call Start every time you want to reset the timer to zero.
Implements Timer.
|
finalvirtual |
Obtains a timer measurement in seconds.
Call this repeatedly to get multiple measurements.
Implements Timer.