projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ed7764
)
util/time: add util_time_sleep() for windows userspace
author
Keith Whitwell
<keithw@vmware.com>
Mon, 27 Apr 2009 13:43:31 +0000
(14:43 +0100)
committer
Keith Whitwell
<keithw@vmware.com>
Mon, 27 Apr 2009 13:43:57 +0000
(14:43 +0100)
Somebody with a clue could probably do a better implemenation...
src/gallium/auxiliary/util/u_time.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_time.c
b/src/gallium/auxiliary/util/u_time.c
index 8afe4fccf7bbcd38f697ec7666e923f67b2951ba..8e167d3c42f0f2429031495d0919cffcd2d5d83c 100644
(file)
--- 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