diff options
author | Waley Chen <waleycz@gmail.com> | 2016-04-15 16:50:55 -0400 |
---|---|---|
committer | Waley Chen <waleycz@gmail.com> | 2016-04-15 18:02:09 -0400 |
commit | de534119c84dfd07ecf9401de94d3524268ec6fa (patch) | |
tree | 31d57cfd92a0de7a7109a48bd58d1b1e1758810b /src/mongo/util/background_thread_clock_source.cpp | |
parent | 04f48bd5ae704d3a8df8bf7b8864d7258f4241e3 (diff) | |
download | mongo-de534119c84dfd07ecf9401de94d3524268ec6fa.tar.gz |
SERVER-23243 Add getPrecision to ClockSource
Diffstat (limited to 'src/mongo/util/background_thread_clock_source.cpp')
-rw-r--r-- | src/mongo/util/background_thread_clock_source.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/util/background_thread_clock_source.cpp b/src/mongo/util/background_thread_clock_source.cpp index 96dececff9c..3a2d43c1f82 100644 --- a/src/mongo/util/background_thread_clock_source.cpp +++ b/src/mongo/util/background_thread_clock_source.cpp @@ -56,6 +56,10 @@ BackgroundThreadClockSource::~BackgroundThreadClockSource() { _timer.join(); } +Milliseconds BackgroundThreadClockSource::getPrecision() { + return _granularity; +} + Date_t BackgroundThreadClockSource::now() { return Date_t::fromMillisSinceEpoch(_current.load()); } |