OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef VM_TIMER_H_ | 5 #ifndef VM_TIMER_H_ |
6 #define VM_TIMER_H_ | 6 #define VM_TIMER_H_ |
7 | 7 |
8 #include "platform/utils.h" | 8 #include "platform/utils.h" |
9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
11 #include "vm/os.h" | 11 #include "vm/os.h" |
12 | 12 |
13 namespace dart { | 13 namespace dart { |
14 | 14 |
15 class JSONObject; | |
16 | |
17 // Timer class allows timing of specific operations in the VM. | 15 // Timer class allows timing of specific operations in the VM. |
18 class Timer : public ValueObject { | 16 class Timer : public ValueObject { |
19 public: | 17 public: |
20 Timer(bool report, const char* message) | 18 Timer(bool report, const char* message) |
21 : report_(report), message_(message) { | 19 : report_(report), message_(message) { |
22 Reset(); | 20 Reset(); |
23 } | 21 } |
24 ~Timer() {} | 22 ~Timer() {} |
25 | 23 |
26 // Start timer. | 24 // Start timer. |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 160 |
163 DISALLOW_ALLOCATION(); | 161 DISALLOW_ALLOCATION(); |
164 DISALLOW_COPY_AND_ASSIGN(PauseTimerScope); | 162 DISALLOW_COPY_AND_ASSIGN(PauseTimerScope); |
165 }; | 163 }; |
166 | 164 |
167 | 165 |
168 | 166 |
169 } // namespace dart | 167 } // namespace dart |
170 | 168 |
171 #endif // VM_TIMER_H_ | 169 #endif // VM_TIMER_H_ |
OLD | NEW |