summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qtimestamp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qtimestamp.h')
-rw-r--r--src/corelib/tools/qtimestamp.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/corelib/tools/qtimestamp.h b/src/corelib/tools/qtimestamp.h
index f923cd4..1e913f0 100644
--- a/src/corelib/tools/qtimestamp.h
+++ b/src/corelib/tools/qtimestamp.h
@@ -56,20 +56,12 @@ public:
static bool isMonotonic();
void start();
- qint64 restart()
- {
- qint64 r = elapsed();
- start();
- return r;
- }
+ qint64 restart();
+ void invalidate();
+ bool isValid() const;
qint64 elapsed() const;
- bool hasExpired(qint64 timeout) const
- {
- // if timeout is -1, quint64(timeout) is LLINT_MAX, so this will be
- // considered as never expired
- return quint64(elapsed()) > quint64(timeout);
- }
+ bool hasExpired(qint64 timeout) const;
qint64 msecsTo(const QTimestamp &other) const;
void addMSecs(int ms);