diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2014-02-18 18:39:31 +0000 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2014-02-18 18:39:31 +0000 |
commit | 8b28e693b25992174be3e865ea444414713b27ec (patch) | |
tree | e13d3d19e2c9436220a920fb7ae00772faf62da2 /src/include/platform.h | |
parent | b7dabd9efbd86724944f9a1e79bc04dc4e6cc9f3 (diff) | |
download | libmicrohttpd-8b28e693b25992174be3e865ea444414713b27ec.tar.gz libmicrohttpd-8b28e693b25992174be3e865ea444414713b27ec.zip |
add sleep() and usleep() replacement for W32
Diffstat (limited to 'src/include/platform.h')
-rw-r--r-- | src/include/platform.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/platform.h b/src/include/platform.h index 1ee0ee1c..84c381d7 100644 --- a/src/include/platform.h +++ b/src/include/platform.h | |||
@@ -120,6 +120,8 @@ | |||
120 | 120 | ||
121 | #if defined(_WIN32) && !defined(__CYGWIN__) | 121 | #if defined(_WIN32) && !defined(__CYGWIN__) |
122 | #include <ws2tcpip.h> | 122 | #include <ws2tcpip.h> |
123 | #define sleep(seconds) (SleepEx((seconds)*1000, 1)/1000) | ||
124 | #define usleep(useconds) (void)SleepEx((useconds)/1000, 1) | ||
123 | #endif | 125 | #endif |
124 | 126 | ||
125 | #ifndef MHD_SOCKET_DEFINED | 127 | #ifndef MHD_SOCKET_DEFINED |