Remove a timer created with SDL_AddTimer().
Defined in <SDL3/SDL_timer.h>
id | the ID of the timer to remove |
Returns SDL_TRUE if the timer is removed or SDL_FALSE if the timer wasn't found.
This function is available since SDL 3.0.0.
extern void *my_callback_param;
extern Uint32 SDLCALL my_callbackfunc(Uint32 interval, void *param);
Uint32 delay = (33 / 10) * 10; /* To round it down to the nearest 10 ms */
/* ... */
SDL_TimerID my_timer_id = SDL_AddTimer(delay, my_callbackfunc, my_callback_param);
/* ... */
SDL_RemoveTimer(my_timer_id);