|
SDL3pp
A slim C++ wrapper for SDL3
|
Function prototype for the nanosecond timer callback function. More...


Public Member Functions | |
| template<std::invocable< TimerID, std::chrono::nanoseconds > F> | |
| TimerCB (const F &func) | |
| ctor | |
Public Member Functions inherited from SDL::LightweightCallbackT< TimerCB, Uint64, TimerID, Uint64 > | |
| LightweightCallbackT (const F &func) | |
| ctor | |
Additional Inherited Members | |
Public Attributes inherited from SDL::LightweightCallbackT< TimerCB, Uint64, TimerID, Uint64 > | |
| Uint64(* | wrapper )(void *, PARAMS...) |
| The wrapper function. | |
| void * | data |
| The wrapped data. | |
The callback function is passed the current timer interval and returns the next timer interval, in nanoseconds. If the returned value is the same as the one passed in, the periodic alarm continues, otherwise a new alarm is scheduled. If the callback returns 0, the periodic alarm is canceled and will be removed.
| timerID | the current timer being processed. |
| interval | the current callback time interval. |