diff options
author | Waley Chen <waleycz@gmail.com> | 2016-04-15 02:58:33 -0400 |
---|---|---|
committer | Waley Chen <waleycz@gmail.com> | 2016-04-15 02:58:33 -0400 |
commit | c2041cd99ea8ff1aa8bfba2d4bcb3bbd2ea7932c (patch) | |
tree | 1a7b9828a9883d470c5f85322371eff738279731 /src/mongo/db/service_context.cpp | |
parent | 7850673c0303b740ecdd2b8718d8c745e25884b3 (diff) | |
download | mongo-c2041cd99ea8ff1aa8bfba2d4bcb3bbd2ea7932c.tar.gz |
SERVER-23243 Extract time-keeping from Listener
BackgroundThreadClockSource & FastClockSourceFactory
Diffstat (limited to 'src/mongo/db/service_context.cpp')
-rw-r--r-- | src/mongo/db/service_context.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/service_context.cpp b/src/mongo/db/service_context.cpp index 075fafd7360..5bcf655cb93 100644 --- a/src/mongo/db/service_context.cpp +++ b/src/mongo/db/service_context.cpp @@ -147,6 +147,10 @@ TickSource* ServiceContext::getTickSource() const { return _tickSource.get(); } +ClockSource* ServiceContext::getFastClockSource() const { + return _fastClockSource.get(); +} + ClockSource* ServiceContext::getPreciseClockSource() const { return _preciseClockSource.get(); } @@ -155,6 +159,10 @@ void ServiceContext::setTickSource(std::unique_ptr<TickSource> newSource) { _tickSource = std::move(newSource); } +void ServiceContext::setFastClockSource(std::unique_ptr<ClockSource> newSource) { + _fastClockSource = std::move(newSource); +} + void ServiceContext::setPreciseClockSource(std::unique_ptr<ClockSource> newSource) { _preciseClockSource = std::move(newSource); } |