summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/os/os_time.c6
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