diff options
| author | Ruoxin Xu <ruoxin.xu@mongodb.com> | 2022-07-27 14:57:52 +0000 |
|---|---|---|
| committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-07-27 16:28:42 +0000 |
| commit | 331153cb62f0e0d0545a5906c3bcc17a90bea02c (patch) | |
| tree | 01b1d79b4a4341dd648aee9fb283ee139f732998 /src/mongo/db/service_context.cpp | |
| parent | 10d28f2eb868656fbde804df0cb2ef9cf3934125 (diff) | |
| download | mongo-331153cb62f0e0d0545a5906c3bcc17a90bea02c.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); } |
