Video | Events | OpenGL | Audio | CD-ROM | Threads | Time
# Time
Introduction | Function List | Function Reference | Examples
SDL provides several cross-platform functions for dealing with time. It provides a way to get the current time, a way to wait a little while, and a simple timer mechanism. These functions give you two ways of moving an object every x milliseconds: Use a timer callback function This may have the bad effect that it runs in a seperate thread or uses alarm signals, but it's easier to implement Or you can get the number of milliseconds passed, and move the object if, for example, 30 ms passed. See the examples for more information.