diff options
Diffstat (limited to 'base/metrics/histogram.cc')
-rw-r--r-- | base/metrics/histogram.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/base/metrics/histogram.cc b/base/metrics/histogram.cc index dbd7278..8b11ee8 100644 --- a/base/metrics/histogram.cc +++ b/base/metrics/histogram.cc @@ -114,6 +114,14 @@ Histogram* Histogram::FactoryTimeGet(const std::string& name, bucket_count, flags); } +TimeTicks Histogram::DebugNow() { +#ifndef NDEBUG + return TimeTicks::Now(); +#else + return TimeTicks(); +#endif +} + void Histogram::Add(int value) { if (value > kSampleType_MAX - 1) value = kSampleType_MAX - 1; |