summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-10-02 13:01:48 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-10-02 13:08:19 (GMT)
commita841c496bb7ca54fef01f9785e0d91991172b182 (patch)
tree58369493f30ea6e748256d068a6a9a2821f60903
parent2bfff24add67c1e5e0b1273a4b0399d9d94316c1 (diff)
downloadQt-a841c496bb7ca54fef01f9785e0d91991172b182.zip
Qt-a841c496bb7ca54fef01f9785e0d91991172b182.tar.gz
Qt-a841c496bb7ca54fef01f9785e0d91991172b182.tar.bz2
Use multimedia timers on Windows for timers less than 16ms
According to http://msdn.microsoft.com/en-us/library/ms725496(VS.85).aspx, the system time resolution is 10-16ms, so we should use multimedia timers for anything less than 16ms (the worst case).
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index 0474bf3..aae351c 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -539,7 +539,7 @@ void QEventDispatcherWin32Private::registerTimer(WinTimerInfo *t)
int ok = 0;
- if (t->interval > 10 || !t->interval || !qtimeSetEvent) {
+ if (t->interval > 15 || !t->interval || !qtimeSetEvent) {
ok = 1;
if (!t->interval) // optimization for single-shot-zero-timer
QCoreApplication::postEvent(q, new QZeroTimerEvent(t->timerId));