const std = @import("std");
pub const c = @import("c.zig").c;

pub inline fn getTicks() u64 {
    return c.SDL_GetTicks();
}

pub inline fn getTicksNS() u64 {
    return c.SDL_GetTicksNS();
}

pub inline fn getPerformanceCounter() u64 {
    return c.SDL_GetPerformanceCounter();
}

pub inline fn getPerformanceFrequency() u64 {
    return c.SDL_GetPerformanceFrequency();
}

pub inline fn delay(ms: u32) void {
    return c.SDL_Delay(ms);
}

pub inline fn delayNS(ns: u64) void {
    return c.SDL_DelayNS(ns);
}

pub inline fn delayPrecise(ns: u64) void {
    return c.SDL_DelayPrecise(ns);
}

pub const TimerID = u32;

pub const TimerCallback = c.SDL_TimerCallback;

pub inline fn addTimer(interval: u32, callback: TimerCallback, userdata: ?*anyopaque) TimerID {
    return c.SDL_AddTimer(interval, callback, userdata);
}

pub const NSTimerCallback = c.SDL_NSTimerCallback;

pub inline fn addTimerNS(interval: u64, callback: NSTimerCallback, userdata: ?*anyopaque) TimerID {
    return c.SDL_AddTimerNS(interval, callback, userdata);
}

pub inline fn removeTimer(id: TimerID) bool {
    return c.SDL_RemoveTimer(id);
}
