|
Ultralight C++ API 2.0.0
|
#include <AppCore/App.h>
Handle to a repeating timer created with App::SetInterval().
The handle owns the timer. Destroying it (or calling Cancel()) stops the timer and destroys its user data. Handles are move-only and should be destroyed on the main thread.
Public Member Functions | |
| TimerHandle () | |
| Create an empty handle that refers to no timer. | |
| ~TimerHandle () | |
| Cancel the timer, if any. | |
| TimerHandle (TimerHandle &&other) noexcept | |
| Move constructor (the source is left empty). | |
| TimerHandle & | operator= (TimerHandle &&other) noexcept |
| Move assignment. | |
| TimerHandle (const TimerHandle &)=delete | |
| TimerHandle & | operator= (const TimerHandle &)=delete |
| void | Cancel () |
| Stop the timer and destroy its user data. | |
| operator bool () const | |
| Whether or not this handle still refers to a timer (false after Cancel() or a move). | |
Friends | |
| class | AppImpl |
|
inline |
Create an empty handle that refers to no timer.
|
inline |
Cancel the timer, if any.
|
inlinenoexcept |
Move constructor (the source is left empty).
|
delete |
|
inline |
Stop the timer and destroy its user data.
Safe to call more than once.
|
inlineexplicit |
Whether or not this handle still refers to a timer (false after Cancel() or a move).
|
delete |
|
inlinenoexcept |
Move assignment.
Cancels the timer this handle held, if any; the source is left empty.
|
friend |