summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qtimer.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-04-17 12:58:41 +0200
committerLars Knoll <lars.knoll@nokia.com>2012-04-17 12:58:52 +0200
commit64255ef6502b1144f7b0aa4b2bf62803e0d4788b (patch)
tree29bf116bfda2ccf61057115690d14f85cc9b085b /src/corelib/kernel/qtimer.cpp
parent4a9fb41a7947d0bb7a47a9625603a436df288b24 (diff)
parent7e0beba891cb963a1d535bd45b0be78b43b8d07f (diff)
Merge remote-tracking branch 'origin/api_changes'
Diffstat (limited to 'src/corelib/kernel/qtimer.cpp')
-rw-r--r--src/corelib/kernel/qtimer.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp
index f434df177c..2131188439 100644
--- a/src/corelib/kernel/qtimer.cpp
+++ b/src/corelib/kernel/qtimer.cpp
@@ -387,6 +387,25 @@ void QTimer::setInterval(int msec)
}
/*!
+ \property QTimer::remainingTime
+ \brief the remaining time in milliseconds
+
+ Returns the timer's remaining value in milliseconds left until the timeout.
+ If the timer is inactive, the returned value will be -1. If the timer is
+ overdue, the returned value will be 0.
+
+ \sa interval
+*/
+int QTimer::remainingTime() const
+{
+ if (id != INV_TIMER) {
+ return QAbstractEventDispatcher::instance()->remainingTime(id);
+ }
+
+ return -1;
+}
+
+/*!
\property QTimer::timerType
\brief controls the accuracy of the timer