summaryrefslogtreecommitdiff
path: root/src/mongo/db/service_context_d.cpp
diff options
context:
space:
mode:
authorWaley Chen <waleycz@gmail.com>2016-04-25 17:24:46 -0400
committerWaley Chen <waleycz@gmail.com>2016-04-25 17:25:10 -0400
commit046441de98dd72689397a4a06f8a68ef58a4c226 (patch)
tree49825e54815d04c4d952421efcd1a59b9c7109ee /src/mongo/db/service_context_d.cpp
parent3e9149a2db5a6d2e2ecf262340dc052d4dfaaea8 (diff)
downloadmongo-046441de98dd72689397a4a06f8a68ef58a4c226.tar.gz
SERVER-23243 Replace the easy-to-remove usages of Listener::getElapsedTimeMillis()
Diffstat (limited to 'src/mongo/db/service_context_d.cpp')
-rw-r--r--src/mongo/db/service_context_d.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/service_context_d.cpp b/src/mongo/db/service_context_d.cpp
index ecb449e7adb..b82f89c4c05 100644
--- a/src/mongo/db/service_context_d.cpp
+++ b/src/mongo/db/service_context_d.cpp
@@ -39,6 +39,7 @@
#include "mongo/db/client.h"
#include "mongo/db/op_observer.h"
#include "mongo/db/operation_context_impl.h"
+#include "mongo/db/service_context.h"
#include "mongo/db/storage/storage_engine.h"
#include "mongo/db/storage/storage_engine_lock_file.h"
#include "mongo/db/storage/storage_engine_metadata.h"
@@ -57,8 +58,11 @@ namespace mongo {
MONGO_INITIALIZER(SetGlobalEnvironment)(InitializerContext* context) {
setGlobalServiceContext(stdx::make_unique<ServiceContextMongoD>());
- getGlobalServiceContext()->setTickSource(stdx::make_unique<SystemTickSource>());
- getGlobalServiceContext()->setPreciseClockSource(stdx::make_unique<SystemClockSource>());
+ auto service = getGlobalServiceContext();
+
+ service->setTickSource(stdx::make_unique<SystemTickSource>());
+ service->setFastClockSource(stdx::make_unique<SystemClockSource>());
+ service->setPreciseClockSource(stdx::make_unique<SystemClockSource>());
return Status::OK();
}