diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-11-15 10:18:26 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-11-15 10:18:26 +0000 |
commit | 5b2071b9f54c54cbc79225b27faf8ac645158e72 (patch) | |
tree | 78291a536308ae428be60969477e407f8f423ddc /fastos | |
parent | d817a7407ee9cef2684a9777a0b5d33c6b35a5f3 (diff) |
Use steady_clock
Diffstat (limited to 'fastos')
-rw-r--r-- | fastos/src/vespa/fastos/timestamp.cpp | 6 | ||||
-rw-r--r-- | fastos/src/vespa/fastos/timestamp.h | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/fastos/src/vespa/fastos/timestamp.cpp b/fastos/src/vespa/fastos/timestamp.cpp index 8f8480d09ab..de234a988cd 100644 --- a/fastos/src/vespa/fastos/timestamp.cpp +++ b/fastos/src/vespa/fastos/timestamp.cpp @@ -63,15 +63,17 @@ ClockSteady::now() return steady_now(); } -void +StopWatch & StopWatch::start() { _startTime = steady_now(); _stopTime = _startTime; + return *this; } -void +StopWatch & StopWatch::stop() { _stopTime = steady_now(); + return *this; } } diff --git a/fastos/src/vespa/fastos/timestamp.h b/fastos/src/vespa/fastos/timestamp.h index 21ef9d6df75..300875ed4b8 100644 --- a/fastos/src/vespa/fastos/timestamp.h +++ b/fastos/src/vespa/fastos/timestamp.h @@ -72,8 +72,8 @@ class StopWatch public: StopWatch() : _startTime(), _stopTime() { } - void start(); - void stop(); + StopWatch & start(); + StopWatch & stop(); TimeStamp startTime() const { return _startTime; } |