diff options
Diffstat (limited to 'src/corelib/tools/qelapsedtimer.h')
-rw-r--r-- | src/corelib/tools/qelapsedtimer.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/corelib/tools/qelapsedtimer.h b/src/corelib/tools/qelapsedtimer.h index 4fa0ca5..827359b 100644 --- a/src/corelib/tools/qelapsedtimer.h +++ b/src/corelib/tools/qelapsedtimer.h @@ -53,8 +53,20 @@ QT_MODULE(Core) class Q_CORE_EXPORT QElapsedTimer { public: + enum ClockType { + SystemTime, + MonotonicClock, + TickCounter, + MachAbsoluteTime + }; + static ClockType clockType(); static bool isMonotonic(); + static inline QElapsedTimer started() + { QElapsedTimer t; t.start(); return t; } + static inline QElapsedTimer invalid() + { QElapsedTimer t; t.invalidate(); return t; } + void start(); qint64 restart(); void invalidate(); @@ -63,6 +75,7 @@ public: qint64 elapsed() const; bool hasExpired(qint64 timeout) const; + qint64 msecsSinceReference() const; qint64 msecsTo(const QElapsedTimer &other) const; qint64 secsTo(const QElapsedTimer &other) const; |