author Sam Lantinga <slouken@libsdl.org>
Thu, 27 Jan 2011 14:45:06 -0800
changeset 5111 481dabb098ef
parent 1895 c121d94672cb
permissions -rw-r--r--
Improved timer implementation

The new timer model is formalized as using a separate thread to handle timer callbacks. This was the case on almost every platform before, but it's now a requirement, and simplifies the implementation and makes it perform consistently across platforms.

* Minimize timer thread blocking
* Dispatch timers as accurately as possible
* SDL_AddTimer() and SDL_RemoveTimer() are completely threadsafe
* SDL_RemoveTimer() doesn't crash with a timer that's expired or removed
     1 WARNING: This code is under construction, may not build, and is unstable!