From 03f4bfecc1effadcad69d4419c2ae34480dc62fc Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 11 Feb 2024 13:42:12 +0100 Subject: [PATCH] Dont need this I_GetPrecise Precision already gets the high res windows time anyways --- src/sdl/i_system.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 13f841a5b..9b4619d34 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -3304,28 +3304,6 @@ void I_SleepDuration(precise_t duration) int status; do status = clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, &ts); while (status == EINTR); -#elif defined(_WIN32) - LARGE_INTEGER frequency; - LARGE_INTEGER start, current; - - QueryPerformanceFrequency(&frequency); - QueryPerformanceCounter(&start); - - LONGLONG targetTicks = duration * frequency.QuadPart; - - do { - QueryPerformanceCounter(¤t); - LONGLONG elapsedTicks = current.QuadPart - start.QuadPart; - - LONGLONG remainingTicks = targetTicks - elapsedTicks; - - LONGLONG remainingTime = remainingTicks / frequency.QuadPart; - - if (remainingTime > 0.001) { - Sleep((DWORD)(remainingTime * 1000)); - } - - } while (current.QuadPart - start.QuadPart < targetTicks); #else UINT64 precision = I_GetPrecisePrecision(); INT32 sleepvalue = cv_sleep.value;