diff options
Diffstat (limited to 'src/xszmq.cpp')
-rw-r--r-- | src/xszmq.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/xszmq.cpp b/src/xszmq.cpp index 350929d..b1f892a 100644 --- a/src/xszmq.cpp +++ b/src/xszmq.cpp @@ -25,10 +25,18 @@ #include "../include/xs.h" #include "../include/xs_utils.h" +#include "platform.hpp" + #include <assert.h> #include <stdlib.h> #include <stdint.h> +#if !defined XS_HAVE_WINDOWS +#include <unistd.h> +#else +#include <windows.hpp> +#endif + void zmq_version (int *major_, int *minor_, int *patch_) { *major_ = ZMQ_VERSION_MAJOR; @@ -451,8 +459,12 @@ unsigned long zmq_stopwatch_stop (void *watch) return xs_stopwatch_stop (watch); } -void zmq_sleep (int seconds) +void zmq_sleep (int seconds_) { - xs_sleep (seconds); +#if defined XS_HAVE_WINDOWS + Sleep (seconds_ * 1000); +#else + sleep (seconds_); +#endif } |