[Box Backup-commit] COMMIT r940 - box/chris/merge/test/basicserver
subversion at fluffy.co.uk
subversion at fluffy.co.uk
Sat Sep 2 12:12:01 BST 2006
Author: chris
Date: 2006-09-02 12:12:01 +0100 (Sat, 02 Sep 2006)
New Revision: 940
Modified:
box/chris/merge/test/basicserver/testbasicserver.cpp
Log:
(refs #3)
Sleep without nanosleep() on Win32
Modified: box/chris/merge/test/basicserver/testbasicserver.cpp
===================================================================
--- box/chris/merge/test/basicserver/testbasicserver.cpp 2006-09-02 11:09:41 UTC (rev 939)
+++ box/chris/merge/test/basicserver/testbasicserver.cpp 2006-09-02 11:12:01 UTC (rev 940)
@@ -31,7 +31,6 @@
#include "MemLeakFindOn.h"
-
#define SERVER_LISTEN_PORT 2003
// in ms
@@ -62,10 +61,14 @@
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
More information about the Boxbackup-commit
mailing list