summaryrefslogtreecommitdiffstats
path: root/source/cSleep.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/cSleep.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/cSleep.cpp b/source/cSleep.cpp
new file mode 100644
index 000000000..920ffaf65
--- /dev/null
+++ b/source/cSleep.cpp
@@ -0,0 +1,16 @@
+#include "cSleep.h"
+
+#ifdef _WIN32
+#include <Windows.h>
+#else
+#include <unistd.h>
+#endif
+
+void cSleep::MilliSleep( unsigned int a_MilliSeconds )
+{
+#ifdef _WIN32
+ Sleep(a_MilliSeconds); // Don't tick too much
+#else
+ usleep(a_MilliSeconds*1000);
+#endif
+}