From c243dd564397fedbe3d2221da72d7ce207eebade Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Wed, 14 Jan 2015 16:27:10 +0100 Subject: 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 Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira --- src/corelib/io/qwindowspipewriter_p.h | 6 +++--- 1 file 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 +#include #include #include #include @@ -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; }; -- cgit v1.2.3