|
Size: 1069
Comment: update content - RV; camelcase
|
Size: 818
Comment: Changed parameter name to match SDL_timer.h.
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 3: | Line 3: |
| ||<tablewidth="100%" style="color: #FF0000;" :> DRAFT|| | |
| 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 14: | Line 11: |
| SDL_bool SDL_RemoveTimer(SDL_TimerID t) | SDL_bool SDL_RemoveTimer(SDL_TimerID id) |
| Line 18: | Line 15: |
| ||'''t'''||^the ID of the timer to remove^|| | ||'''id'''||^the ID of the timer to remove^|| |
| Line 21: | Line 18: |
| 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?)>> | Returns SDL_TRUE if the timer is removed or SDL_FALSE if the timer wasn't found. |
| Line 37: | 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().
Contents
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
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
