summaryrefslogtreecommitdiff
path: root/src/mongo/db/stats/timer_stats.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/stats/timer_stats.cpp')
-rw-r--r--src/mongo/db/stats/timer_stats.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/stats/timer_stats.cpp b/src/mongo/db/stats/timer_stats.cpp
index 970f5671872..f0543b22123 100644
--- a/src/mongo/db/stats/timer_stats.cpp
+++ b/src/mongo/db/stats/timer_stats.cpp
@@ -31,7 +31,10 @@ namespace mongo {
int TimerHolder::recordMillis() {
_recorded = true;
- return _stats->record( _t );
+ if ( _stats ) {
+ return _stats->record( _t );
+ }
+ return _t.millis();
}
void TimerStats::recordMillis( int millis ) {