diff --git a/src/common/otherTools.cpp b/src/common/otherTools.cpp index b0b93ed36..355b672b0 100644 --- a/src/common/otherTools.cpp +++ b/src/common/otherTools.cpp @@ -18,3 +18,11 @@ */ #include "otherTools.h" + +void kiwix::sleep(unsigned int milliseconds) { +#ifdef _WIN32 + Sleep(milliseconds); +#else + sleep(1000 * milliseconds); +#endif +} diff --git a/src/common/otherTools.h b/src/common/otherTools.h index a247a4b0b..d2fe5d795 100644 --- a/src/common/otherTools.h +++ b/src/common/otherTools.h @@ -22,6 +22,8 @@ namespace kiwix { + void sleep(unsigned int milliseconds); + } #endif