|
Size: 855
Comment: create page, add content (Wed Mar 10 ver; changeset 4428)
|
Size: 1069
Comment: update content - RV; camelcase
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 2: | Line 2: |
| #pragma disable-camelcase | #pragma camelcase off |
| 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. <<Color2(green,How do you get the ID? Should that info be included on this page?)>> |
| Line 19: | Line 21: |
| 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 on failure; call [[SDL_GetError]]() for more information. <<Color2(green,Call SDL_GetError here?)>> |
| Line 27: | Line 25: |
| You can add your code example here | 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); |
| Line 31: | Line 37: |
| ''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
Contents
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. 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);
Remarks
It is not safe to remove a timer multiple times.
