Remove a timer created with SDL_AddTimer().
Defined in <SDL3/SDL_timer.h>
SDL_bool SDL_RemoveTimer(SDL_TimerID id);
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);
33 / 10) * 10; /* To round it down to the nearest 10 ms */
Uint32 delay = (
/* ... */
SDL_TimerID my_timer_id = SDL_AddTimer(delay, my_callbackfunc, my_callback_param);
/* ... */
SDL_RemoveTimer(my_timer_id);
CategoryAPI, CategoryAPIFunction, CategoryTimer