diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-08-30 16:11:05 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-08-30 16:18:43 (GMT) |
commit | 328d5f7784c41ca9d91459c32f464fcf95eff5ed (patch) | |
tree | 535b8a0a1a08ea6f9dd006df355d5e084178fd3e /src/testlib | |
parent | 8bfe99b9e4673dc49106caa589449d670285d0ad (diff) | |
download | Qt-328d5f7784c41ca9d91459c32f464fcf95eff5ed.zip Qt-328d5f7784c41ca9d91459c32f464fcf95eff5ed.tar.gz Qt-328d5f7784c41ca9d91459c32f464fcf95eff5ed.tar.bz2 |
Different version from the previous patch: use QElapsedTimer
Reviewed-By: Olivier Goffart
Diffstat (limited to 'src/testlib')
-rw-r--r-- | src/testlib/qtestcase.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 34d3712..aae2786 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -54,7 +54,6 @@ #include <QtCore/qdir.h> #include <QtCore/qprocess.h> #include <QtCore/qdebug.h> -#include <QtCore/qdatetime.h> #include "QtTest/private/qtestlog_p.h" #include "QtTest/private/qtesttable_p.h" @@ -957,7 +956,9 @@ void seedRandom() static bool randomSeeded = false; if (!randomSeeded) { if (!QTest::seedSet) { - QTest::seed = QDateTime::currentDateTime().toTime_t(); + QElapsedTimer timer; + timer.start(); + QTest::seed = timer.msecsSinceReference(); } qsrand(QTest::seed); randomSeeded = true; |