summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-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
-rw-r--r--src/network/ssl/qsslsocket.cpp10
6 files changed, 24 insertions, 24 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index fc50ee5..21cd0fd 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 9d412ac..dfda257 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 20301ba..f14decc 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 7c1fc17..6c800fe 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 0c6a01a..f68edfe 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?
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 895e32c..86b11b9 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -287,7 +287,7 @@
#include <QtCore/qdebug.h>
#include <QtCore/qdir.h>
#include <QtCore/qmutex.h>
-#include <QtCore/qtimestamp.h>
+#include <QtCore/qelapsedtimer.h>
#include <QtNetwork/qhostaddress.h>
#include <QtNetwork/qhostinfo.h>
@@ -1393,7 +1393,7 @@ bool QSslSocket::waitForEncrypted(int msecs)
if (d->mode == UnencryptedMode && !d->autoStartHandshake)
return false;
- QTimestamp stopWatch;
+ QElapsedTimer stopWatch;
stopWatch.start();
if (d->plainSocket->state() != QAbstractSocket::ConnectedState) {
@@ -1433,7 +1433,7 @@ bool QSslSocket::waitForReadyRead(int msecs)
bool *previousReadyReadEmittedPointer = d->readyReadEmittedPointer;
d->readyReadEmittedPointer = &readyReadEmitted;
- QTimestamp stopWatch;
+ QElapsedTimer stopWatch;
stopWatch.start();
if (!d->connectionEncrypted) {
@@ -1470,7 +1470,7 @@ bool QSslSocket::waitForBytesWritten(int msecs)
if (d->mode == UnencryptedMode)
return d->plainSocket->waitForBytesWritten(msecs);
- QTimestamp stopWatch;
+ QElapsedTimer stopWatch;
stopWatch.start();
if (!d->connectionEncrypted) {
@@ -1508,7 +1508,7 @@ bool QSslSocket::waitForDisconnected(int msecs)
if (d->mode == UnencryptedMode)
return d->plainSocket->waitForDisconnected(msecs);
- QTimestamp stopWatch;
+ QElapsedTimer stopWatch;
stopWatch.start();
if (!d->connectionEncrypted) {