version 1.4.55b
[polyglot.git] / util.c
diff --git a/util.c b/util.c
index a3fb3ba..06f868d 100644 (file)
--- a/util.c
+++ b/util.c
@@ -514,3 +514,13 @@ void my_quote(char *out, const char *in, const char *special){
 }\r
 \r
 \r
+void my_sleep(int msec){\r
+#ifndef _WIN32\r
+  struct timespec tm;\r
+  tm.tv_sec=msec/1000;\r
+  tm.tv_nsec=1000000*(msec%1000);\r
+  nanosleep(&tm,NULL);\r
+#else\r
+  Sleep(msec);\r
+#endif\r
+}\r