Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Unified Diff: runtime/vm/timer.h

Issue 10389023: Fixed compilation time measurement, restructure some code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« runtime/vm/object.cc ('K') | « runtime/vm/opt_code_generator_ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« runtime/vm/object.cc ('K') | « runtime/vm/opt_code_generator_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698