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(); |
+ } |
Camillo Bruni
2016/10/27 09:00:58
Maybe let's write this in a loop instead of recurs
lpy
2016/10/27 16:59:21
We need to maintain the order of timer restart fro
|
+ |
RuntimeCallCounter* counter_ = nullptr; |
RuntimeCallTimer* parent_ = nullptr; |
base::ElapsedTimer timer_; |