diff options
Diffstat (limited to 'src/mongo/util/timer.cpp')
-rw-r--r-- | src/mongo/util/timer.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/mongo/util/timer.cpp b/src/mongo/util/timer.cpp index d38b7d43642..8703dc88f6e 100644 --- a/src/mongo/util/timer.cpp +++ b/src/mongo/util/timer.cpp @@ -38,22 +38,20 @@ namespace mongo { namespace { - const int64_t kMicrosPerSecond = 1000 * 1000; +const int64_t kMicrosPerSecond = 1000 * 1000; -} // unnamed namespace +} // unnamed namespace - Timer::Timer(): Timer(SystemTickSource::get()) { - } +Timer::Timer() : Timer(SystemTickSource::get()) {} - Timer::Timer(TickSource* tickSource): - _tickSource(tickSource), - _microsPerCount(static_cast<double>(kMicrosPerSecond) / - _tickSource->getTicksPerSecond()) { - reset(); - } +Timer::Timer(TickSource* tickSource) + : _tickSource(tickSource), + _microsPerCount(static_cast<double>(kMicrosPerSecond) / _tickSource->getTicksPerSecond()) { + reset(); +} - long long Timer::now() const { - return _tickSource->getTicks(); - } +long long Timer::now() const { + return _tickSource->getTicks(); +} } // namespace mongo |