From 5749a18faea208ad19f39612c3c55166ca409fef Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Tue, 13 Mar 2012 12:19:31 +0100 Subject: xs_utils cleanup 1/2 (minimize exported api) Reduced xs_utils to the minimum functions required (xs_stopwatch_*) xs_sleep, xs_thread_* are internal to unit tests and have been moved to testutil.hpp, useless use of xs_sleep in perf/ has been removed. Signed-off-by: Martin Lucina --- src/xszmq.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/xszmq.cpp') 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 #include #include +#if !defined XS_HAVE_WINDOWS +#include +#else +#include +#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 } -- cgit v1.2.3