summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-05-06 11:40:56 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-05-06 11:40:56 +0100
commitd7c9facf9b7641602a41d9827f1b6b3cde315ad5 (patch)
tree0f7c0b3b0e7455fe8dd8abfa185d73507ce66874
parent09356e7a2f5b709256611b073efaace68f6ba46a (diff)
Provide sleep() and usleepp() for windows.
-rw-r--r--src/glean/tbase.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glean/tbase.h b/src/glean/tbase.h
index 4f0104f..f990226 100644
--- a/src/glean/tbase.h
+++ b/src/glean/tbase.h
@@ -110,6 +110,11 @@ and tbasic.cpp.
#include <unistd.h>
#endif
+#ifdef __WIN32__
+#define sleep(__sec) Sleep((__sec)*1000)
+#define usleep(__usec) Sleep(((__usec) + 999)/1000)
+#endif
+
#include <iostream>
#include <fstream>
#include "dsconfig.h"