summaryrefslogtreecommitdiff
path: root/src/mongo/db/service_context.h
diff options
context:
space:
mode:
authorWaley Chen <waleycz@gmail.com>2016-04-07 01:37:03 -0400
committerWaley Chen <waleycz@gmail.com>2016-04-07 01:37:03 -0400
commit97d7ef4a5120cf7e7d6d912c0f0381663d9d0c3e (patch)
tree79614a25a17d501d8e60588a70688baaa8af366c /src/mongo/db/service_context.h
parentff8061cd1d97e99f141b02a7fe36e83f302b909c (diff)
downloadmongo-97d7ef4a5120cf7e7d6d912c0f0381663d9d0c3e.tar.gz
SERVER-23243 Extract time-keeping from Listener
Renaming so we can differentiate between the two types of clocks (fast and precise): 1. setClockSource() -> setPreciseClockSource() 2. _clockSource -> _preciseClockSource
Diffstat (limited to 'src/mongo/db/service_context.h')
-rw-r--r--src/mongo/db/service_context.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mongo/db/service_context.h b/src/mongo/db/service_context.h
index 08b4b55bdf5..4a5b54bb6c7 100644
--- a/src/mongo/db/service_context.h
+++ b/src/mongo/db/service_context.h
@@ -319,7 +319,12 @@ public:
* destroyed. So make sure that no one is using the old source when calling this.
*/
void setTickSource(std::unique_ptr<TickSource> newSource);
- void setClockSource(std::unique_ptr<ClockSource> newSource);
+
+ /**
+ * Call this method with a ClockSource implementation that is very precise but
+ * may be expensive to call.
+ */
+ void setPreciseClockSource(std::unique_ptr<ClockSource> newSource);
protected:
ServiceContext() = default;
@@ -343,7 +348,7 @@ private:
ClientSet _clients;
std::unique_ptr<TickSource> _tickSource;
- std::unique_ptr<ClockSource> _clockSource;
+ std::unique_ptr<ClockSource> _preciseClockSource;
};
/**