From 14ed6c19cec02d05815fe10a0da1f7305ae473e6 Mon Sep 17 00:00:00 2001 From: Gokul Krishnan C M Date: Tue, 30 Jun 2026 22:52:50 +0530 Subject: [PATCH] fix: call timeBeginPeriod(1) once at startup instead of in tick function --- application/stopwatch.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/stopwatch.h b/application/stopwatch.h index 3c4d2d27..54a27edf 100644 --- a/application/stopwatch.h +++ b/application/stopwatch.h @@ -7,6 +7,9 @@ #include #endif #include +#ifdef _WIN64 +#include +#endif /*============================================================================= @@ -60,6 +63,9 @@ void stopwatch_delay(const f32 ms) stopwatch_t stopwatch(void) { +#ifdef _WIN64 + timeBeginPeriod(1); +#endif stopwatch_t output = {0}; output.now = stopwatch_get_tick(); output.raw_dt = 0.01f;