diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2010-09-30 15:29:40 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2010-12-20 14:23:14 (GMT) |
commit | e679392978c21266ec0bf6f960ab8c5f0621e18b (patch) | |
tree | 292f2e214acb4cb9b8f3e89a102d65cb7d9260a9 /src/corelib/tools/qelapsedtimer.h | |
parent | daba2c507ad42c66dafa6a29cffa94e9641e0c58 (diff) | |
download | Qt-e679392978c21266ec0bf6f960ab8c5f0621e18b.zip Qt-e679392978c21266ec0bf6f960ab8c5f0621e18b.tar.gz Qt-e679392978c21266ec0bf6f960ab8c5f0621e18b.tar.bz2 |
Add QElapsedTimer::nsecsElapsed() const
Allow sub-millisecond resolution on systems where it is possible. On UNIX,
with monotonic clock support we get full nanosecond resolution, microsecond
otherwise. On Windows we convert the performance counters to nanoseconds if
availble, otherwise we only have millisecond resolution. On Mac, the mach time
is converted to nanoseconds. On Symbian, we have microsecond resolution.
Reviewed-by: joao
Diffstat (limited to 'src/corelib/tools/qelapsedtimer.h')
-rw-r--r-- | src/corelib/tools/qelapsedtimer.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/tools/qelapsedtimer.h b/src/corelib/tools/qelapsedtimer.h index b996f6a..4118389 100644 --- a/src/corelib/tools/qelapsedtimer.h +++ b/src/corelib/tools/qelapsedtimer.h @@ -68,6 +68,7 @@ public: void invalidate(); bool isValid() const; + qint64 nsecsElapsed() const; qint64 elapsed() const; bool hasExpired(qint64 timeout) const; |