Wiki Page Content

Differences between revisions 5 and 7 (spanning 2 versions)
Revision 5 as of 2011-02-25 20:11:16
Size: 1146
Editor: SheenaSmith
Comment: remove green comment
Revision 7 as of 2013-08-08 18:32:26
Size: 816
Editor: Sam Lantinga
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
#pragma disable-camelcase
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||
#pragma camelcase off
Line 6: Line 5:
Use this function to remove a timer, ^created with [[SDL_AddTimer]](),^ knowing its ID.

<<Color2(green,How do you get the ID? Should that info be included on this page?)>>
Use this function to remove a timer created with [[SDL_AddTimer]]().
Line 21: Line 18:
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. <<Color2(green,Does SDL_!GetError work with this type?)>>
Returns SDL_TRUE if the timer is removed or SDL_FALSE if the timer wasn't found.
Line 41: Line 34:
/!\ It is not safe to remove a timer multiple times. ''You can add useful comments here''

SDL_RemoveTimer

Use this function to remove a timer created with SDL_AddTimer().

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 if the timer wasn't found.

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

You can add useful comments here


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