From aaaa7deb814bc24380f40f612682532f4d07a7ac Mon Sep 17 00:00:00 2001 From: jacob Date: Thu, 30 Jan 2025 08:50:39 -0600 Subject: [PATCH] rename timer frequency -> qpc per second --- src/sys_win32.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sys_win32.c b/src/sys_win32.c index 7386652a..373d9530 100644 --- a/src/sys_win32.c +++ b/src/sys_win32.c @@ -99,7 +99,7 @@ struct win32_window { GLOBAL struct { SYSTEM_INFO info; i64 timer_start_qpc; - i64 timer_qpc_frequency; + i64 qpc_per_second; i64 ns_per_qpc; i32 scheduler_period_ms; DWORD thread_tls_index; @@ -1931,7 +1931,7 @@ INTERNAL void win32_precise_sleep_timer(f64 seconds, HANDLE timer) /* TODO: Does the high frequency timer even require setting / scaling of * timeBeginPeriod/scheduler_period_ms? There isn't much documentation. */ - i64 qpc_per_second = G.timer_qpc_frequency; + i64 qpc_per_second = G.qpc_per_second; i32 scheduler_period_ms = G.scheduler_period_ms; LARGE_INTEGER qpc; @@ -1972,7 +1972,7 @@ INTERNAL void win32_precise_sleep_timer(f64 seconds, HANDLE timer) INTERNAL void win32_precise_sleep_legacy(f64 seconds) { __prof; - i64 qpc_per_second = G.timer_qpc_frequency; + i64 qpc_per_second = G.qpc_per_second; i32 scheduler_period_ms = G.scheduler_period_ms; LARGE_INTEGER qpc; @@ -2063,7 +2063,7 @@ int CALLBACK wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev_instance, LARGE_INTEGER qpf; QueryPerformanceFrequency(&qpf); - G.timer_qpc_frequency = qpf.QuadPart; + G.qpc_per_second = qpf.QuadPart; G.ns_per_qpc = 1000000000 / qpf.QuadPart; LARGE_INTEGER qpc;