remove time stuff from core

This commit is contained in:
krzosa
2025-01-03 14:01:32 +01:00
parent da3fceb19f
commit 1a16255c24
11 changed files with 25 additions and 44 deletions

View File

@@ -236,6 +236,20 @@ void w32_try_resizing_canvas(w32_canvas_t *canvas, HWND window_handle) {
}
}
fn f64 os_seconds_now(void) {
static int64_t counts_per_second;
if (counts_per_second == 0) {
LARGE_INTEGER freq;
QueryPerformanceFrequency(&freq);
counts_per_second = freq.QuadPart;
}
LARGE_INTEGER time;
QueryPerformanceCounter(&time);
f64 result = (f64)time.QuadPart / (f64)counts_per_second;
return result;
}
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) {
tcx.temp = ma_create(ma_default_reserve_size);