Wiki Page Content

Differences between revisions 3 and 4
Revision 3 as of 2010-10-12 18:32:04
Size: 1303
Editor: SheenaSmith
Comment: minor change
Revision 4 as of 2011-02-14 23:25:16
Size: 1223
Editor: SheenaSmith
Comment: update content - 2/14 changeset 5295
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
Use this function to remove one of the ,,multiple,, timers ^created with [[SDL_AddTimer]](),^ knowing its ID. Use this function to remove a timer, ^created with [[SDL_AddTimer]](),^ knowing its ID.
Line 8: Line 8:
<<Color2(green,How do you get the ID? Should that info be included on this page?  Does it have to be "multiple" timers or could you remove the only timer?)>> <<Color2(green,How do you get the ID? Should that info be included on this page?)>>
Line 43: Line 43:
''You can add useful comments here'' /!\ It is not safe to remove a timer multiple times.

DRAFT

SDL_RemoveTimer

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

green

Syntax

SDL_bool SDL_RemoveTimer(SDL_TimerID t)

Function Parameters

t

the ID of the timer to remove

Return Value

Returns a boolean value indicating success or failure.

-or-

Returns SDL_TRUE on success or SDL_FALSE on failure; call SDL_GetError() for more information. green

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

green

Remarks

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


CategoryAPI, CategoryTimer

None: SDL_RemoveTimer (last edited 2017-02-19 20:53:26 by PhilippWiesemann)

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