util/time: add util_time_sleep() for windows userspace

Somebody with a clue could probably do a better implemenation...
This commit is contained in:
Keith Whitwell
2009-04-27 14:43:31 +01:00
parent 5ed7764fd6
commit 5250eec652
+9
View File
@@ -217,4 +217,13 @@ void util_time_sleep(unsigned usecs)
} while(start <= curr && curr < end ||
end < start && (curr < end || start <= curr));
}
#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
#include <unistd.h>
#include <fcntl.h>
void util_time_sleep(unsigned usecs)
{
Sleep((usecs + 999)/ 1000);
}
#endif