summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qnamespace.qdoc
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2012-01-10 10:34:30 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-10 16:11:00 +0100
commitf2edb41c38d2e7f14b339daea4871512be252320 (patch)
tree634d6abba26ba9ffd6cbea3d4fd16d892bb07529 /src/corelib/global/qnamespace.qdoc
parentc3ad8c1c062a972b7fb75d8b51a1f80cb371d503 (diff)
Use Qt::TimerType on Windows when starting timers
Make all Qt::PreciseTimers and timers with intervals < 20ms use Multimedia timers for maximum accuracy. Qt::CoarseTimers and Qt::VeryCoarseTimers use normal Windows timers, with Qt::VeryCoarseTimers having their interval rounded to the nearest full second. Note that the Windows timer implementation does not attempt to align timers and reduce CPU wakeups like the UNIX implementation does. This might be done in the future, though. However, this change does the best we can do now, keeping most timers working as-is, while allowing explicit use of Multimedia timers via Qt::PreciseTimer. Change-Id: I1898272b101c572a2a9b9454fef27a651eb178f5 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/corelib/global/qnamespace.qdoc')
-rw-r--r--src/corelib/global/qnamespace.qdoc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 58ca8d312e..dbc399809f 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -2875,4 +2875,10 @@
\value PreciseTimer Precise timers try to keep millisecond accuracy
\value CoarseTimer Coarse timers try to keep accuracy within 5% of the desired interval
\value VeryCoarseTimer Very coarse timers only keep full second accuracy
+
+ On Windows, Qt will use Windows's Multimedia timer facility (if available)
+ for Qt::PreciseTimer and normal Windows timers for Qt::CoarseTimer and
+ Qt::VeryCoarseTimer. The interval for Qt::VeryCoarseTimer is rounded to the
+ nearest full second (e.g. an interval of 23500ms will be rounded to
+ 24000ms, and 20300ms to 20000ms).
*/