summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qtimer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qtimer.cpp')
-rw-r--r--src/corelib/kernel/qtimer.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp
index f40f491..6c4eb1b 100644
--- a/src/corelib/kernel/qtimer.cpp
+++ b/src/corelib/kernel/qtimer.cpp
@@ -50,9 +50,8 @@ QT_BEGIN_NAMESPACE
\class QTimer
\brief The QTimer class provides repetitive and single-shot timers.
- \ingroup time
\ingroup events
- \mainclass
+
The QTimer class provides a high-level programming interface for
timers. To use it, create a QTimer, connect its timeout() signal
@@ -101,10 +100,22 @@ QT_BEGIN_NAMESPACE
more and more platforms, and we expect that zero-millisecond
QTimers will gradually be replaced by \l{QThread}s.
- Note that QTimer's accuracy depends on the underlying operating
- system and hardware. Most platforms support an accuracy of
- 1 millisecond. If Qt is unable to deliver the requested number of
- timer clicks, it will silently discard some.
+ \section1 Accuracy and Timer Resolution
+
+ Timers will never time out earlier than the specified timeout value
+ and they are not guaranteed to time out at the exact value specified.
+ In many situations, they may time out late by a period of time that
+ depends on the accuracy of the system timers.
+
+ The accuracy of timers depends on the underlying operating system
+ and hardware. Most platforms support a resolution of 1 millisecond,
+ though the accuracy of the timer will not equal this resolution
+ in many real-world situations.
+
+ If Qt is unable to deliver the requested number of timer clicks,
+ it will silently discard some.
+
+ \section1 Alternatives to QTimer
An alternative to using QTimer is to call QObject::startTimer()
for your object and reimplement the QObject::timerEvent() event