diff options
Diffstat (limited to 'src/gallium/auxiliary/os')
-rw-r--r-- | src/gallium/auxiliary/os/os_time.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/os/os_time.c b/src/gallium/auxiliary/os/os_time.c index 40551252b25..f943e0f3162 100644 --- a/src/gallium/auxiliary/os/os_time.c +++ b/src/gallium/auxiliary/os/os_time.c @@ -88,7 +88,11 @@ os_time_get_nano(void) void os_time_sleep(int64_t usecs) { - Sleep((usecs + 999) / 1000); + DWORD dwMilliseconds = (usecs + 999) / 1000; + /* Avoid Sleep(O) as that would cause to sleep for an undetermined duration */ + if (dwMilliseconds) { + Sleep(dwMilliseconds); + } } #endif |