summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtesteventloop.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/testlib/qtesteventloop.h b/src/testlib/qtesteventloop.h
index 32d186bd0e..7a04c82da3 100644
--- a/src/testlib/qtesteventloop.h
+++ b/src/testlib/qtesteventloop.h
@@ -64,7 +64,8 @@ inline void QTestEventLoop::enterLoopMSecs(int ms)
return;
QEventLoop l;
- timerId = startTimer(ms);
+ // if tests want to measure sub-second precision, use a precise timer
+ timerId = startTimer(ms, ms < 1000 ? Qt::PreciseTimer : Qt::CoarseTimer);
loop = &l;
l.exec();