Bundle SDL2 multimedia library for 2D graphics, input handling, audio playback, and window management. Core types: Window, Renderer, Texture, Surface, Event, and Mixer. Compile with -lib sdl2.
Timer
SDL time management routines
Operations
Delay # function
Wait a specified number of milliseconds before returning
function : Delay(ms:Int) ~ Nil
Parameters
| Name | Type | Description |
|---|
| ms | Int | number of milliseconds to delay |
GetTicks # function
Get the number of milliseconds since the SDL library initialization
function : GetTicks() ~ Int
Return
| Type | Description |
|---|
| Int | value representing the number of milliseconds since the SDL library initialized |
Passed # function
Compares SDL ticks values
function : Passed(a:Int, b:Int) ~ Bool
Parameters
| Name | Type | Description |
|---|
| a | Int | the first ticks values |
| b | Int | the second ticks values |
Return
| Type | Description |
|---|
| Bool | true if A has passed B, false otherwise |