Mercurial > sdl-ios-xcode
comparison include/SDL_timer.h @ 1028:5ba65305c954
Fix various problems with the timer code.
* SDL_timer_running wasn't always updated correctly.
* Fixed occasional crash in SDL_SetTimer() when clearing threaded timers
* It was possible to get both the timer thread and event thread running
* Other misc. cleanup
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 13 Jan 2005 23:24:56 +0000 |
parents | b8d311d90021 |
children | c9b51268668f |
comparison
equal
deleted
inserted
replaced
1027:c69697a85412 | 1028:5ba65305c954 |
---|---|
79 * | 79 * |
80 * Under UNIX, you should not use raise or use SIGALRM and this function | 80 * Under UNIX, you should not use raise or use SIGALRM and this function |
81 * in the same program, as it is implemented using setitimer(). You also | 81 * in the same program, as it is implemented using setitimer(). You also |
82 * should not use this function in multi-threaded applications as signals | 82 * should not use this function in multi-threaded applications as signals |
83 * to multi-threaded apps have undefined behavior in some implementations. | 83 * to multi-threaded apps have undefined behavior in some implementations. |
84 * | |
85 * This function returns 0 if successful, or -1 if there was an error. | |
84 */ | 86 */ |
85 extern DECLSPEC int SDLCALL SDL_SetTimer(Uint32 interval, SDL_TimerCallback callback); | 87 extern DECLSPEC int SDLCALL SDL_SetTimer(Uint32 interval, SDL_TimerCallback callback); |
86 | 88 |
87 /* New timer API, supports multiple timers | 89 /* New timer API, supports multiple timers |
88 * Written by Stephane Peter <megastep@lokigames.com> | 90 * Written by Stephane Peter <megastep@lokigames.com> |