Wiki Page Content

Differences between revisions 1 and 9 (spanning 8 versions)
Revision 1 as of 2010-05-18 00:33:35
Size: 855
Editor: SheenaSmith
Comment: create page, add content (Wed Mar 10 ver; changeset 4428)
Revision 9 as of 2015-08-18 20:52:33
Size: 837
Comment: Added types in example.
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 one of the multiple timers ^created with [[SDL_AddTimer]]()^ knowing its ID. Use this function to remove a timer created with [[SDL_AddTimer]]().
Line 12: Line 11:
SDL_bool SDL_RemoveTimer(SDL_TimerID t) SDL_bool SDL_RemoveTimer(SDL_TimerID id)
Line 16: Line 15:
||'''t'''||^the ID of the timer to remove^|| ||'''id'''||^the ID of the timer to remove^||
Line 19: Line 18:
Returns ^SDL_TRUE^ on success, or ^SDL_FALSE^ on failure; call [[SDL_GetError]]() for more information.

''-OR-''

Returns a ,,boolean value indicating success or failure.,,
Returns SDL_TRUE if the timer is removed or SDL_FALSE if the timer wasn't found.
Line 27: Line 22:
You can add your code example here 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);

SDL_RemoveTimer

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

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.

Code Examples

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

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