summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-08-20 22:57:07 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-08-24 13:40:07 (GMT)
commita55f392edc2145a071d0d59cb0fc69b0d5205a76 (patch)
treea9948affb319aaddd074e52ddbe81eb31b049b88 /src/testlib
parentebf9d5dd5174b7c82fec83b56d71a59d5277bd51 (diff)
downloadQt-a55f392edc2145a071d0d59cb0fc69b0d5205a76.zip
Qt-a55f392edc2145a071d0d59cb0fc69b0d5205a76.tar.gz
Qt-a55f392edc2145a071d0d59cb0fc69b0d5205a76.tar.bz2
Use QElapsedTimer for the benchlib tests.
It's faster to calculate the time with it, since it doesn't need to convert to local time first. Reviewed-By: Harald Fernengel
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qbenchmarkmeasurement_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testlib/qbenchmarkmeasurement_p.h b/src/testlib/qbenchmarkmeasurement_p.h
index 932852c..20a3bc1 100644
--- a/src/testlib/qbenchmarkmeasurement_p.h
+++ b/src/testlib/qbenchmarkmeasurement_p.h
@@ -53,7 +53,7 @@
// We mean it.
//
-#include <QtCore/qdatetime.h>
+#include <QtCore/qelapsedtimer.h>
#include "3rdparty/cycle_p.h"
#include "qbenchmark.h"
@@ -87,7 +87,7 @@ public:
bool needsWarmupIteration();
QTest::QBenchmarkMetric metricType();
private:
- QTime time;
+ QElapsedTimer time;
};
#ifdef HAVE_TICK_COUNTER // defined in 3rdparty/cycle_p.h