summaryrefslogtreecommitdiff
path: root/client/sendrecieve.cc
diff options
context:
space:
mode:
authorsenator <senator>2008-03-24 14:21:34 +0000
committersenator <senator>2008-03-24 14:21:34 +0000
commit2e47f002aff970ee1dd0a22c88febd5682ed2482 (patch)
treef2ba34d0f2c00858b787372279bbb56f4e3c4a6f /client/sendrecieve.cc
parent2646a66dacf629f21399a6bc83289e39c3d843b9 (diff)
win32 compatibility for sleep function in sendrecieve.cc
Diffstat (limited to 'client/sendrecieve.cc')
-rw-r--r--client/sendrecieve.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/client/sendrecieve.cc b/client/sendrecieve.cc
index 8b4732b..0a664eb 100644
--- a/client/sendrecieve.cc
+++ b/client/sendrecieve.cc
@@ -35,6 +35,13 @@
#include <QByteArray>
#include <QSettings>
+#ifdef HOST_WIN32
+#include <windows.h>
+#define sleep(x) Sleep(x * 1000)
+#else
+#include <unistd.h>
+#endif
+
SendRecieve::SendRecieve()
: QObject()
{
@@ -63,7 +70,7 @@ void SendRecieve::tcpDisconnect()
tcpConnected = TCP_DISCONNECTED;
return;
}
- usleep(5000);
+ sleep(1);
printf("ERROR!!! Couldn't connect to host!\n");
qApp->processEvents();
}