diff options
author | Martin Lucina <martin@lucina.net> | 2012-03-13 12:19:31 +0100 |
---|---|---|
committer | Martin Lucina <martin@lucina.net> | 2012-03-13 12:19:31 +0100 |
commit | 5749a18faea208ad19f39612c3c55166ca409fef (patch) | |
tree | 51976654ec6b706293820fe6b104f8f41774b5f4 /src/xszmq.cpp | |
parent | 4ae2af8c9a3f9f928b411eb31b4007a4ce8f26ba (diff) |
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 <martin@lucina.net>
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 } |