diff options
author | Daniel Teske <daniel.teske@theqtcompany.com> | 2015-01-14 16:27:10 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-01-19 10:50:08 +0100 |
commit | c243dd564397fedbe3d2221da72d7ce207eebade (patch) | |
tree | 2598d2c485c4f7c597ffb0e0d7d2aaf5f6f8d9de /src/corelib/io/qwindowspipewriter_p.h | |
parent | c49641a117356662aea31d8b4e7fdf4055cc0b4f (diff) |
QIncrementalSleepTimer: Use QElapsedTimer instead of QTime
Since the former is monotonic and we need a monotonic timer here.
Change-Id: I34325da4fe0317e12f64629a6eef6a80990c3e1a
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qwindowspipewriter_p.h')
-rw-r--r-- | src/corelib/io/qwindowspipewriter_p.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/io/qwindowspipewriter_p.h b/src/corelib/io/qwindowspipewriter_p.h index 47b7744e81..6035993500 100644 --- a/src/corelib/io/qwindowspipewriter_p.h +++ b/src/corelib/io/qwindowspipewriter_p.h @@ -45,7 +45,7 @@ // We mean it. // -#include <qdatetime.h> +#include <qelapsedtimer.h> #include <qthread.h> #include <qmutex.h> #include <qwaitcondition.h> @@ -83,7 +83,7 @@ public: { if (totalTimeOut == -1) return SLEEPMAX; - return qMax(totalTimeOut - timer.elapsed(), 0); + return qMax(int(totalTimeOut - timer.elapsed()), 0); } bool hasTimedOut() const @@ -99,7 +99,7 @@ public: } private: - QTime timer; + QElapsedTimer timer; int totalTimeOut; int nextSleep; }; |