diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2012-01-10 13:43:51 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-10 16:11:15 +0100 |
commit | 7776beacf720cf4478767f5b75440c4a359d8bcf (patch) | |
tree | 718cec332dc6cd4d8916cc2efc364b01d4d69ec5 | |
parent | 46b2e5f37d124a66f6f930abc64a0c1da55bbfde (diff) |
Document timer accuracy behavior on UNIX.
Change-Id: I5e8b383cc4d8ce0d249be164c5ef596328bdc50c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index dbc399809f..3c2697e1f8 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -2876,9 +2876,17 @@ \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 UNIX (including Linux and Mac OS X), Qt will keep millisecond accuracy + for Qt::PreciseTimer. For Qt::CoarseTimer, the interval will be adjusted up + to 5% to align the timer with other timers that are expected to fire at or + around the same time. The objective is to make most timers wake up at the + same time, thereby reducing CPU wakeups and power consumption. + 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 + Qt::VeryCoarseTimer. + + On all platforms, 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). */ |