summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/basicserver/testbasicserver.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/basicserver/testbasicserver.cpp b/test/basicserver/testbasicserver.cpp
index f5185b96..3360cd20 100644
--- a/test/basicserver/testbasicserver.cpp
+++ b/test/basicserver/testbasicserver.cpp
@@ -31,7 +31,6 @@
#include "MemLeakFindOn.h"
-
#define SERVER_LISTEN_PORT 2003
// in ms
@@ -62,10 +61,14 @@ void basicdaemon::Run()
void testservers_pause_before_reply()
{
- struct timespec t;
- t.tv_sec = 0;
- t.tv_nsec = COMMS_SERVER_WAIT_BEFORE_REPLYING * 1000 * 1000; // convert to ns
- ::nanosleep(&t, NULL);
+#ifdef WIN32
+ Sleep(COMMS_SERVER_WAIT_BEFORE_REPLYING);
+#else
+ struct timespec t;
+ t.tv_sec = 0;
+ t.tv_nsec = COMMS_SERVER_WAIT_BEFORE_REPLYING * 1000 * 1000; // convert to ns
+ ::nanosleep(&t, NULL);
+#endif
}
#define LARGE_DATA_BLOCK_SIZE 19870