SDL Wiki
(This is the documentation for SDL3, which is under heavy development and the API is changing! SDL2 is the current stable version!)

SDL_RemoveTimer

Remove a timer created with SDL_AddTimer().

Header File

Defined in <SDL3/SDL_timer.h>

Syntax

SDL_bool SDL_RemoveTimer(SDL_TimerID id);

Function Parameters

id the ID of the timer to remove

Return Value

Returns SDL_TRUE if the timer is removed or SDL_FALSE if the timer wasn't found.

Version

This function is available since SDL 3.0.0.

Code Examples

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);

See Also


CategoryAPI, CategoryAPIFunction, CategoryTimer


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.