diff options
Diffstat (limited to 'storageframework/src/vespa/storageframework/defaultimplementation/clock/realclock.cpp')
-rw-r--r-- | storageframework/src/vespa/storageframework/defaultimplementation/clock/realclock.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/storageframework/src/vespa/storageframework/defaultimplementation/clock/realclock.cpp b/storageframework/src/vespa/storageframework/defaultimplementation/clock/realclock.cpp index e9348512427..86343a7c4ea 100644 --- a/storageframework/src/vespa/storageframework/defaultimplementation/clock/realclock.cpp +++ b/storageframework/src/vespa/storageframework/defaultimplementation/clock/realclock.cpp @@ -9,31 +9,29 @@ namespace storage { namespace framework { namespace defaultimplementation { -MicroSecTime -RealClock::getTimeInMicros() const -{ +MicroSecTime RealClock::getTimeInMicros() const { struct timeval mytime; gettimeofday(&mytime, 0); return MicroSecTime(mytime.tv_sec * 1000000llu + mytime.tv_usec); } -MilliSecTime -RealClock::getTimeInMillis() const -{ +MilliSecTime RealClock::getTimeInMillis() const { struct timeval mytime; gettimeofday(&mytime, 0); return MilliSecTime( mytime.tv_sec * 1000llu + mytime.tv_usec / 1000); } -SecondTime -RealClock::getTimeInSeconds() const -{ +SecondTime RealClock::getTimeInSeconds() const { struct timeval mytime; gettimeofday(&mytime, 0); return SecondTime(mytime.tv_sec); } +MonotonicTimePoint RealClock::getMonotonicTime() const { + return std::chrono::steady_clock::now(); +} + } // defaultimplementation } // framework } // storage |