diff options
author | Ruoxin Xu <ruoxin.xu@mongodb.com> | 2022-07-26 10:19:14 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-07-26 11:32:37 +0000 |
commit | e7d2be0dae29265e2a6efafd4753debf11b9e96f (patch) | |
tree | 394a15ee762d5eee6abad5d492e35330789c6dcf /src/mongo/db/service_context.cpp | |
parent | e922e94ad274ef6d712d3a454a6d8427a736f2f6 (diff) | |
download | mongo-e7d2be0dae29265e2a6efafd4753debf11b9e96f.tar.gz |
SERVER-67101 Support microsecond precision in ScopedTimer
Diffstat (limited to 'src/mongo/db/service_context.cpp')
-rw-r--r-- | src/mongo/db/service_context.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/service_context.cpp b/src/mongo/db/service_context.cpp index 013e3209f95..4bbefa82ba4 100644 --- a/src/mongo/db/service_context.cpp +++ b/src/mongo/db/service_context.cpp @@ -102,6 +102,7 @@ ServiceContext::ServiceContext() : _opIdRegistry(UniqueOperationIdRegistry::create()), _tickSource(std::make_unique<SystemTickSource>()), _fastClockSource(std::make_unique<SystemClockSource>()), + _clockTickSource(_fastClockSource.get()), _preciseClockSource(std::make_unique<SystemClockSource>()) {} @@ -212,6 +213,7 @@ void ServiceContext::setTickSource(std::unique_ptr<TickSource> newSource) { } void ServiceContext::setFastClockSource(std::unique_ptr<ClockSource> newSource) { + _clockTickSource.setClockSource(newSource.get()); _fastClockSource = std::move(newSource); } |