dReal4
|
Pauses the passed timer object when the guard object is destructed (e.g. More...
#include </home/soonhokong/work/dreal4/dreal/util/timer.h>
Public Member Functions | |
TimerGuard (Timer *timer, bool enabled, bool start_timer=true) | |
Constructs the timer guard object with timer . More... | |
TimerGuard (const TimerGuard &)=delete | |
TimerGuard (TimerGuard &&)=delete | |
TimerGuard & | operator= (const TimerGuard &)=delete |
TimerGuard & | operator= (TimerGuard &&)=delete |
~TimerGuard () | |
Destructs the timer guard object. It pauses the embedded timer object. | |
void | pause () |
Pauses the embedded timer object. | |
void | resume () |
Resumes the embedded timer object. | |
Pauses the passed timer object when the guard object is destructed (e.g.
going out of scope).
TimerGuard | ( | Timer * | timer, |
bool | enabled, | ||
bool | start_timer = true |
||
) |
Constructs the timer guard object with timer
.
If enabled
is false, this class does not do anything. If start_timer
is true, starts the timer
in the constructor. Otherwise, it does not start it and a user has to call resume()
to start it.