#include <timer.h>
Helper class to automatically cancel and destroy a timer on shutdown.
This class is useful to automatically cancel and destroy a timer on shutdown. usage: static Global<AutoTimer> g_myTimer; g_myTimer = TimerInterface::AddPeriodicTimer(Seconds(1), []() { ... }, JobQueueInterface::MainThreadQueue());
Public Member Functions | |
| AutoTimer ()=default | |
| AutoTimer (AutoTimer &&src) | |
| MAXON_IMPLICIT | AutoTimer (const TimerRef &timerRef) |
| MAXON_IMPLICIT | AutoTimer (TimerRef &&timerRef) |
| ~AutoTimer () | |
| MAXON_OPERATOR_MOVE_ASSIGNMENT (AutoTimer) | |
| AutoTimer & | operator= (const TimerRef &timer) |
| AutoTimer & | operator= (TimerRef &&timer) |
Private Attributes | |
| TimerRef | _timerRef |
|
default |
| MAXON_IMPLICIT AutoTimer | ( | const TimerRef & | timerRef | ) |
| MAXON_IMPLICIT AutoTimer | ( | TimerRef && | timerRef | ) |
| ~AutoTimer | ( | ) |
| MAXON_OPERATOR_MOVE_ASSIGNMENT | ( | AutoTimer | ) |
| AutoTimer& operator= | ( | const TimerRef & | timer | ) |
| AutoTimer& operator= | ( | TimerRef && | timer | ) |
|
private |