Add sleep_random function for debugging purposes

This commit is contained in:
Henrik Rydgård committed 2025-05-13 10:41:13 +02:00
1 parent e1e352c5b5
commit 80a11e8cbe
2 files changed
+12

No files matched your search

+3
View File
@@ -25,6 +25,9 @@ void sleep_ms(int ms, const char *reason);
// Precise sleep. Can consume a little bit of CPU on Windows at least.
void sleep_precise(double seconds);
// Random sleep, used for debugging.
void sleep_random(double minSeconds, double maxSeconds);
// Yield. Signals that this thread is busy-waiting but wants to allow other hyperthreads to run.
void yield();