Add a timeout to fallback sleep

This commit is contained in:
FakeMichau
2026-06-08 13:32:02 +02:00
parent 3911cf81d8
commit 238ca06aeb
+1 -1
View File
@@ -28,7 +28,7 @@ inline int FrameLimit::timer_sleep(int64_t hundred_ns)
if (!SetWaitableTimerEx(timer, &due_time, 0, NULL, NULL, NULL, 0))
return 2;
if (WaitForSingleObject(timer, INFINITE) != WAIT_OBJECT_0)
if (WaitForSingleObject(timer, 1000) != WAIT_OBJECT_0)
return 3;
return 0;