diff options
Diffstat (limited to 'src/corelib/kernel/qelapsedtimer_generic.cpp')
-rw-r--r-- | src/corelib/kernel/qelapsedtimer_generic.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/corelib/kernel/qelapsedtimer_generic.cpp b/src/corelib/kernel/qelapsedtimer_generic.cpp index 8c724247be..fdeb385188 100644 --- a/src/corelib/kernel/qelapsedtimer_generic.cpp +++ b/src/corelib/kernel/qelapsedtimer_generic.cpp @@ -38,6 +38,7 @@ ****************************************************************************/ #include "qelapsedtimer.h" +#include "qdeadlinetimer.h" #include "qdatetime.h" QT_BEGIN_NAMESPACE @@ -145,7 +146,7 @@ qint64 QElapsedTimer::elapsed() const Q_DECL_NOTHROW number of milliseconds since January 1st, 1970 at 0:00 UTC (that is, it is the Unix time expressed in milliseconds). - On Linux, Windows and OS X/iOS systems, this value is usually the time + On Linux, Windows and Apple platforms, this value is usually the time since the system boot, though it usually does not include the time the system has spent in sleep states. @@ -201,4 +202,12 @@ bool operator<(const QElapsedTimer &v1, const QElapsedTimer &v2) Q_DECL_NOTHROW return v1.t1 < v2.t1; } +QDeadlineTimer QDeadlineTimer::current(Qt::TimerType timerType) Q_DECL_NOTHROW +{ + QDeadlineTimer result; + result.t1 = QDateTime::currentMSecsSinceEpoch() * 1000 * 1000; + result.type = timerType; + return result; +} + QT_END_NAMESPACE |