DRAFT

SDL_RemoveTimer

Use this function to remove a timer, created with [[SDL_AddTimer]](), knowing its ID.

How do you get the ID? Should that info be included on this page?

Syntax

SDL_bool SDL_RemoveTimer(SDL_TimerID t)

Function Parameters

t

the ID of the timer to remove

Return Value

Returns SDL_TRUE if the timer is removed or SDL_FALSE on failure; call SDL_GetError() for more information. Call SDL_GetError here?

Code Examples

delay = (33 / 10) * 10;  /* To round it down to the nearest 10 ms */

...

my_timer_id = SDL_AddTimer(delay, my_callbackfunc, my_callback_param);

...

SDL_RemoveTimer(my_timer_id);

Remarks

/!\ It is not safe to remove a timer multiple times.


CategoryAPI, CategoryTimer

SDL_RemoveTimer (last edited 2011-11-05 18:08:29 by SheenaSmith)

Feedback
Please include your contact information if you'd like to receive a reply.
Submit