diff options
author | Keith Whitwell <[email protected]> | 2009-04-27 14:43:31 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2009-04-27 14:43:57 +0100 |
commit | 5250eec652af46d20261624fd043992355a0b4ba (patch) | |
tree | 5c20b5584a3d34181c5fb405c702a2f457bbf999 /src/gallium | |
parent | 5ed7764fd6354da8e2be15d6fb724c2d6be9be4a (diff) |
util/time: add util_time_sleep() for windows userspace
Somebody with a clue could probably do a better implemenation...
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/util/u_time.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_time.c b/src/gallium/auxiliary/util/u_time.c index 8afe4fccf7b..8e167d3c42f 100644 --- a/src/gallium/auxiliary/util/u_time.c +++ b/src/gallium/auxiliary/util/u_time.c @@ -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 |