diff options
Diffstat (limited to 'src/corelib/tools/qtimestamp_win.cpp')
-rw-r--r-- | src/corelib/tools/qtimestamp_win.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/corelib/tools/qtimestamp_win.cpp b/src/corelib/tools/qtimestamp_win.cpp index 1aea5cf..e384dd8 100644 --- a/src/corelib/tools/qtimestamp_win.cpp +++ b/src/corelib/tools/qtimestamp_win.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qtimestamp.h" +#include "qelapsedtimer.h" #include <windows.h> typedef ULONGLONG (WINAPI *PtrGetTickCount64)(void); @@ -88,40 +88,40 @@ static qint64 difference(qint64 a, qint64 b) return retval; } -bool QTimestamp::isMonotonic() +bool QElapsedTimer::isMonotonic() { return true; } -void QTimestamp::start() +void QElapsedTimer::start() { t1 = getTickCount(); t2 = 0; } -qint64 QTimestamp::restart() +qint64 QElapsedTimer::restart() { qint64 oldt1 = t1; t1 = getTickCount(); return difference(t1, oldt1); } -qint64 QTimestamp::elapsed() const +qint64 QElapsedTimer::elapsed() const { return difference(getTickCount(), t1); } -qint64 QTimestamp::msecsTo(const QTimestamp &other) const +qint64 QElapsedTimer::msecsTo(const QElapsedTimer &other) const { return difference(other.t1, t1); } -qint64 QTimestamp::secsTo(const QTimestamp &other) const +qint64 QElapsedTimer::secsTo(const QElapsedTimer &other) const { return msecsTo(other) / 1000; } -bool operator<(const QTimestamp &v1, const QTimestamp &v2) +bool operator<(const QElapsedTimer &v1, const QElapsedTimer &v2) { return difference(v1.t1, v2.t1) < 0; } |