diff options
Diffstat (limited to 'src/mongo/util/background_thread_clock_source.h')
-rw-r--r-- | src/mongo/util/background_thread_clock_source.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/util/background_thread_clock_source.h b/src/mongo/util/background_thread_clock_source.h index 55d0096f58c..03e9e4e302f 100644 --- a/src/mongo/util/background_thread_clock_source.h +++ b/src/mongo/util/background_thread_clock_source.h @@ -56,12 +56,15 @@ public: ~BackgroundThreadClockSource() override; Milliseconds getPrecision() override; Date_t now() override; + Status setAlarm(Date_t when, stdx::function<void()> action) override; /** * Doesn't count as a call to now() for determining whether this ClockSource is idle. + * + * Unlike now(), returns Date_t() if the thread is currently paused. */ - int64_t peekNowForTest() const { - return _current.load(); + Date_t peekNowForTest() const { + return Date_t::fromMillisSinceEpoch(_current.load()); } private: |