From 9dad2af0de6b710db4cb7d68e5d3e4bba40e2e8d Mon Sep 17 00:00:00 2001 From: Brian Padalino Date: Sun, 29 Sep 2013 12:05:14 -0400 Subject: [PATCH] Windows: Call Sleep() with a value > 0. From the documentation: "A value of zero causes the thread to relinquish the remainder of its time slice to any other thread of equal priority that is ready to run. If there are no other threads of equal priority ready to run, the function returns immediately, and the thread continues execution." Thanks Simon! --- host/common/include/host_config.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/common/include/host_config.h.in b/host/common/include/host_config.h.in index b57ea099..5c0c31ac 100644 --- a/host/common/include/host_config.h.in +++ b/host/common/include/host_config.h.in @@ -105,7 +105,7 @@ #define strncasecmp _strnicmp #define fileno _fileno #define strdup _strdup -#define usleep(x) Sleep((x)/1000) +#define usleep(x) Sleep((x+999)/1000) /* ssize_t lives elsewhere */ #include