diff options
Diffstat (limited to 'src/mongo/db/exec/scoped_timer.h')
-rw-r--r-- | src/mongo/db/exec/scoped_timer.h | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/src/mongo/db/exec/scoped_timer.h b/src/mongo/db/exec/scoped_timer.h index fa4c0d1f5c8..3e1c29fe719 100644 --- a/src/mongo/db/exec/scoped_timer.h +++ b/src/mongo/db/exec/scoped_timer.h @@ -32,26 +32,27 @@ namespace mongo { - /** - * This class increments a counter by a rough estimate of the time elapsed since its - * construction when it goes out of scope. - */ - class ScopedTimer { - MONGO_DISALLOW_COPYING(ScopedTimer); - public: - ScopedTimer(long long* counter); - - ~ScopedTimer(); - - private: - // Default constructor disallowed. - ScopedTimer(); - - // Reference to the counter that we are incrementing with the elapsed time. - long long* _counter; - - // Time at which the timer was constructed. - long long _start; - }; +/** + * This class increments a counter by a rough estimate of the time elapsed since its + * construction when it goes out of scope. + */ +class ScopedTimer { + MONGO_DISALLOW_COPYING(ScopedTimer); + +public: + ScopedTimer(long long* counter); + + ~ScopedTimer(); + +private: + // Default constructor disallowed. + ScopedTimer(); + + // Reference to the counter that we are incrementing with the elapsed time. + long long* _counter; + + // Time at which the timer was constructed. + long long _start; +}; } // namespace mongo |