Index: runtime/vm/timer.h |
=================================================================== |
--- runtime/vm/timer.h (revision 7417) |
+++ runtime/vm/timer.h (working copy) |
@@ -39,10 +39,9 @@ |
} |
// Get total cummulative elapsed time in micros and reset the counters. |
hausner
2012/05/08 21:41:01
Please adjust the comment. I think this was origin
srdjan
2012/05/08 21:51:31
Done.
|
- int64_t TotalElapsedTime() { |
+ int64_t TotalElapsedTime() const { |
if (enabled_) { |
int64_t result = total_; |
- Reset(); |
return result; |
} |
return 0; |
@@ -140,10 +139,10 @@ |
// code that needs to be timed. |
// .... |
// } |
-class TimerScope : public ValueObject { |
+class TimerScope : public StackResource { |
public: |
- TimerScope(bool flag, Timer* timer) |
- : flag_(flag), nested_(false), timer_(timer) { |
+ TimerScope(bool flag, Timer* timer, BaseIsolate* isolate = NULL) |
+ : StackResource(isolate), flag_(flag), nested_(false), timer_(timer) { |
if (flag_) { |
if (!timer_->running()) { |
timer_->Start(); |