summaryrefslogtreecommitdiff
path: root/src/network/socket
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/socket')
-rw-r--r--src/network/socket/qabstractsocket.cpp10
-rw-r--r--src/network/socket/qhttpsocketengine.cpp6
-rw-r--r--src/network/socket/qlocalsocket_unix.cpp4
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp4
-rw-r--r--src/network/socket/qsocks5socketengine.cpp14
5 files changed, 19 insertions, 19 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index fc50ee5ca7..21cd0fdfa5 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -370,7 +370,7 @@
#include <qmetaobject.h>
#include <qpointer.h>
#include <qtimer.h>
-#include <qtimestamp.h>
+#include <qelapsedtimer.h>
#ifndef QT_NO_OPENSSL
#include <QtNetwork/qsslsocket.h>
@@ -1738,7 +1738,7 @@ bool QAbstractSocket::waitForConnected(int msecs)
bool wasPendingClose = d->pendingClose;
d->pendingClose = false;
- QTimestamp stopWatch;
+ QElapsedTimer stopWatch;
stopWatch.start();
if (d->state == HostLookupState) {
@@ -1819,7 +1819,7 @@ bool QAbstractSocket::waitForReadyRead(int msecs)
return false;
}
- QTimestamp stopWatch;
+ QElapsedTimer stopWatch;
stopWatch.start();
// handle a socket in connecting state
@@ -1878,7 +1878,7 @@ bool QAbstractSocket::waitForBytesWritten(int msecs)
if (d->writeBuffer.isEmpty())
return false;
- QTimestamp stopWatch;
+ QElapsedTimer stopWatch;
stopWatch.start();
// handle a socket in connecting state
@@ -1960,7 +1960,7 @@ bool QAbstractSocket::waitForDisconnected(int msecs)
return false;
}
- QTimestamp stopWatch;
+ QElapsedTimer stopWatch;
stopWatch.start();
// handle a socket in connecting state
diff --git a/src/network/socket/qhttpsocketengine.cpp b/src/network/socket/qhttpsocketengine.cpp
index 9d412ac0a2..dfda257854 100644
--- a/src/network/socket/qhttpsocketengine.cpp
+++ b/src/network/socket/qhttpsocketengine.cpp
@@ -44,7 +44,7 @@
#include "qhostaddress.h"
#include "qurl.h"
#include "qhttp.h"
-#include "qtimestamp.h"
+#include "qelapsedtimer.h"
#if !defined(QT_NO_NETWORKPROXY) && !defined(QT_NO_HTTP)
#include <qdebug.h>
@@ -319,7 +319,7 @@ bool QHttpSocketEngine::waitForRead(int msecs, bool *timedOut)
if (!d->socket || d->socket->state() == QAbstractSocket::UnconnectedState)
return false;
- QTimestamp stopWatch;
+ QElapsedTimer stopWatch;
stopWatch.start();
// Wait for more data if nothing is available.
@@ -366,7 +366,7 @@ bool QHttpSocketEngine::waitForWrite(int msecs, bool *timedOut)
return true;
}
- QTimestamp stopWatch;
+ QElapsedTimer stopWatch;
stopWatch.start();
// If we're not connected yet, wait until we are, and until bytes have
diff --git a/src/network/socket/qlocalsocket_unix.cpp b/src/network/socket/qlocalsocket_unix.cpp
index 20301babda..f14deccd39 100644
--- a/src/network/socket/qlocalsocket_unix.cpp
+++ b/src/network/socket/qlocalsocket_unix.cpp
@@ -54,7 +54,7 @@
#include <qdir.h>
#include <qdebug.h>
-#include <qtimestamp.h>
+#include <qelapsedtimer.h>
#ifdef Q_OS_VXWORKS
# include <selectLib.h>
@@ -534,7 +534,7 @@ bool QLocalSocket::waitForConnected(int msec)
int result = -1;
// on Linux timeout will be updated by select, but _not_ on other systems.
- QTimestamp timer;
+ QElapsedTimer timer;
timer.start();
while (state() == ConnectingState
&& (-1 == msec || timer.elapsed() < msec)) {
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
index 7c1fc17adf..6c800fe3a8 100644
--- a/src/network/socket/qnativesocketengine_unix.cpp
+++ b/src/network/socket/qnativesocketengine_unix.cpp
@@ -44,7 +44,7 @@
#include "private/qnet_unix_p.h"
#include "qiodevice.h"
#include "qhostaddress.h"
-#include "qtimestamp.h"
+#include "qelapsedtimer.h"
#include "qvarlengtharray.h"
#include <time.h>
#include <errno.h>
@@ -1003,7 +1003,7 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool checkRead, bool c
#ifndef Q_OS_SYMBIAN
ret = qt_safe_select(socketDescriptor + 1, &fdread, &fdwrite, 0, timeout < 0 ? 0 : &tv);
#else
- QTimestamp timer;
+ QElapsedTimer timer;
timer.start();
do {
diff --git a/src/network/socket/qsocks5socketengine.cpp b/src/network/socket/qsocks5socketengine.cpp
index 0c6a01ad96..f68edfe926 100644
--- a/src/network/socket/qsocks5socketengine.cpp
+++ b/src/network/socket/qsocks5socketengine.cpp
@@ -49,7 +49,7 @@
#include "qdebug.h"
#include "qhash.h"
#include "qqueue.h"
-#include "qtimestamp.h"
+#include "qelapsedtimer.h"
#include "qmutex.h"
#include "qthread.h"
#include "qcoreapplication.h"
@@ -308,7 +308,7 @@ struct QSocks5BindData : public QSocks5Data
quint16 localPort;
QHostAddress peerAddress;
quint16 peerPort;
- QTimestamp timeStamp;
+ QElapsedTimer timeStamp;
};
struct QSocks5RevivedDatagram
@@ -1355,7 +1355,7 @@ bool QSocks5SocketEngine::bind(const QHostAddress &address, quint16 port)
}
int msecs = SOCKS5_BLOCKING_BIND_TIMEOUT;
- QTimestamp stopWatch;
+ QElapsedTimer stopWatch;
stopWatch.start();
d->data->controlSocket->connectToHost(d->proxyInfo.hostName(), d->proxyInfo.port());
if (!d->waitForConnected(msecs, 0) ||
@@ -1455,7 +1455,7 @@ void QSocks5SocketEngine::close()
if (d->data && d->data->controlSocket) {
if (d->data->controlSocket->state() == QAbstractSocket::ConnectedState) {
int msecs = 100;
- QTimestamp stopWatch;
+ QElapsedTimer stopWatch;
stopWatch.start();
while (!d->data->controlSocket->bytesToWrite()) {
if (!d->data->controlSocket->waitForBytesWritten(qt_timeout_value(msecs, stopWatch.elapsed())))
@@ -1674,7 +1674,7 @@ bool QSocks5SocketEnginePrivate::waitForConnected(int msecs, bool *timedOut)
mode == BindMode ? BindSuccess :
UdpAssociateSuccess;
- QTimestamp stopWatch;
+ QElapsedTimer stopWatch;
stopWatch.start();
while (socks5State != wantedState) {
@@ -1699,7 +1699,7 @@ bool QSocks5SocketEngine::waitForRead(int msecs, bool *timedOut)
d->readNotificationActivated = false;
- QTimestamp stopWatch;
+ QElapsedTimer stopWatch;
stopWatch.start();
// are we connected yet?
@@ -1749,7 +1749,7 @@ bool QSocks5SocketEngine::waitForWrite(int msecs, bool *timedOut)
Q_D(QSocks5SocketEngine);
QSOCKS5_DEBUG << "waitForWrite" << msecs;
- QTimestamp stopWatch;
+ QElapsedTimer stopWatch;
stopWatch.start();
// are we connected yet?