4 * Get the number of milliseconds since the SDL library initialization.
6 * This value wraps if the program runs for more than ~49 days.
8 function SDL_GetTicks: UInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTicks' {$ENDIF} {$ENDIF};
11 * Get the current value of the high resolution counter
13 function SDL_GetPerformanceCounter: UInt64 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPerformanceCounter' {$ENDIF} {$ENDIF};
16 * Get the count per second of the high resolution counter
18 function SDL_GetPerformanceFrequency: UInt64 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPerformanceFrequency' {$ENDIF} {$ENDIF};
21 * Wait a specified number of milliseconds before returning.
23 procedure SDL_Delay(ms: UInt32) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Delay' {$ENDIF} {$ENDIF};
26 * Function prototype for the timer callback function.
28 * The callback function is passed the current timer interval and returns
29 * the next timer interval. If the returned value is the same as the one
30 * passed in, the periodic alarm continues, otherwise a new alarm is
31 * scheduled. If the callback returns 0, the periodic alarm is cancelled.
35 TSDL_TimerCallback = function(interval: UInt32; param: Pointer): UInt32;
38 * Definition of the timer ID type.
40 TSDL_TimerID = SInt32;
43 * Add a new timer to the pool of timers already running.
45 * A timer ID, or NULL when an error occurs.
47 function SDL_AddTimer(interval: UInt32; callback: TSDL_TimerCallback; param: Pointer): TSDL_TimerID cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AddTimer' {$ENDIF} {$ENDIF};
50 * Remove a timer knowing its ID.
52 * A boolean value indicating success or failure.
54 * It is not safe to remove a timer multiple times.
56 function SDL_RemoveTimer(id: TSDL_TimerID): Boolean cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RemoveTimer' {$ENDIF} {$ENDIF};