OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library engine.utilities.timing; | 5 library analyzer.src.util.utilities_timing; |
6 | 6 |
7 /** | 7 /** |
8 * A `CountedStopwatch` is a [Stopwatch] that counts the number of times the | 8 * A `CountedStopwatch` is a [Stopwatch] that counts the number of times the |
9 * stop method has been invoked. | 9 * stop method has been invoked. |
10 */ | 10 */ |
11 class CountedStopwatch extends Stopwatch { | 11 class CountedStopwatch extends Stopwatch { |
12 /** | 12 /** |
13 * The number of times the [stop] method has been invoked. | 13 * The number of times the [stop] method has been invoked. |
14 */ | 14 */ |
15 int stopCount = 0; | 15 int stopCount = 0; |
(...skipping 14 matching lines...) Expand all Loading... |
30 super.reset(); | 30 super.reset(); |
31 stopCount = 0; | 31 stopCount = 0; |
32 } | 32 } |
33 | 33 |
34 @override | 34 @override |
35 void stop() { | 35 void stop() { |
36 super.stop(); | 36 super.stop(); |
37 stopCount++; | 37 stopCount++; |
38 } | 38 } |
39 } | 39 } |
OLD | NEW |