summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qtimestamp_mac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qtimestamp_mac.cpp')
-rw-r--r--src/corelib/tools/qtimestamp_mac.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/corelib/tools/qtimestamp_mac.cpp b/src/corelib/tools/qtimestamp_mac.cpp
index 02f0fa7..21a6d1b 100644
--- a/src/corelib/tools/qtimestamp_mac.cpp
+++ b/src/corelib/tools/qtimestamp_mac.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "qtimestamp.h"
+#include "qelapsedtimer.h"
#include <sys/time.h>
#include <unistd.h>
@@ -47,7 +47,7 @@
QT_BEGIN_NAMESPACE
-bool QTimestamp::isMonotonic()
+bool QElapsedTimer::isMonotonic()
{
return true;
}
@@ -77,13 +77,13 @@ timeval qt_gettime()
return tv;
}
-void QTimestamp::start()
+void QElapsedTimer::start()
{
t1 = mach_absolute_time();
t2 = 0;
}
-qint64 QTimestamp::restart()
+qint64 QElapsedTimer::restart()
{
qint64 old = t1;
t1 = mach_absolute_time();
@@ -91,23 +91,23 @@ qint64 QTimestamp::restart()
return absoluteToMSecs(t1 - old);
}
-qint64 QTimestamp::elapsed() const
+qint64 QElapsedTimer::elapsed() const
{
uint64_t cpu_time = mach_absolute_time();
return absoluteToMSecs(cpu_time - t1);
}
-qint64 QTimestamp::msecsTo(const QTimestamp &other) const
+qint64 QElapsedTimer::msecsTo(const QElapsedTimer &other) const
{
return absoluteToMSecs(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 v1.t1 < v2.t1;
}