summaryrefslogtreecommitdiff
path: root/src/xszmq.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-03-13 12:40:58 +0100
committerMartin Sustrik <sustrik@250bpm.com>2012-03-13 12:40:58 +0100
commit4a444c0bfca2ef61de6f22cee79104990493c9ae (patch)
tree8d14c1eafb44d0d214d818863e861824447e31f5 /src/xszmq.cpp
parentecfd971cd3321f41a53e03e937fc3f12732b9019 (diff)
parent67c0bc5092cde58fc33205a29ccad6b8230104db (diff)
Merge branch 'for-sustrik' of git.lucina.net:libxs
Diffstat (limited to 'src/xszmq.cpp')
-rw-r--r--src/xszmq.cpp16
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
}