blob: 1b315ec47cc0abee60202576f22998602778179c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Get the number of milliseconds since SDL library initialization.
//
// This value wraps if the program runs for more than ~49 days.
//
// Returns an unsigned 32-bit value representing the number of milliseconds
// since the SDL library initialized.
export @symbol("SDL_GetTicks") fn get_ticks() u32;
// Get the current value of the high resolution counter.
//
// This function is typically used for profiling.
//
// The counter values are only meaningful relative to each other. Differences
// between values can be converted to times by using
// [[getperformancefrequency]].
//
// Returns the current counter value.
export @symbol("SDL_GetPerformanceCounter") fn get_performance_counter() u64;
// Get the count per second of the high resolution counter.
//
// Returns a platform-specific count per second.
export @symbol("SDL_GetPerformanceFrequency") fn get_performance_frequency() u64;
// Wait a specified number of milliseconds before returning.
//
// This function waits a specified number of milliseconds before returning. It
// waits at least the specified time, but possibly longer due to OS
// scheduling.
export @symbol("SDL_Delay") fn delay(ms: u32) void;
// TODO: Timers
|