summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/inspircd_win32wrapper.cpp9
-rw-r--r--win/inspircd_win32wrapper.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/win/inspircd_win32wrapper.cpp b/win/inspircd_win32wrapper.cpp
index 7e72220e8..0b738d538 100644
--- a/win/inspircd_win32wrapper.cpp
+++ b/win/inspircd_win32wrapper.cpp
@@ -776,3 +776,12 @@ int getcpu()
pclsObj->Release();
return -1;
}
+
+void usleep(unsigned long usecs)
+{
+ if (usecs > 0UL)
+ {
+ unsigned long millis = ((usecs + 999UL) / 1000UL);
+ SleepEx(millis, false);
+ }
+}
diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h
index 2935ba5c9..8b7b7d924 100644
--- a/win/inspircd_win32wrapper.h
+++ b/win/inspircd_win32wrapper.h
@@ -220,6 +220,8 @@ CoreExport bool initwmi();
CoreExport void donewmi();
CoreExport int getcpu();
+CoreExport void usleep(unsigned long usecs);
+
#endif