Index: src/counters.h |
diff --git a/src/counters.h b/src/counters.h |
index beb44ad153d67212827e028cd723aa038ef047bd..bc430d71478dbead2f34650f725a47126d845c10 100644 |
--- a/src/counters.h |
+++ b/src/counters.h |
@@ -521,6 +521,16 @@ class RuntimeCallTimer { |
return parent_; |
} |
+ inline void Elapsed() { |
+ base::TimeDelta delta = timer_.Elapsed(); |
+ counter_->time += delta; |
+ if (parent_ != nullptr) { |
+ parent_->counter_->time -= delta; |
+ parent_->Elapsed(); |
+ } |
+ timer_.Restart(); |
+ } |
+ |
RuntimeCallCounter* counter_ = nullptr; |
RuntimeCallTimer* parent_ = nullptr; |
base::ElapsedTimer timer_; |