| 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 /** | 5 /** |
| 6 * A simple [Stopwatch] interface to measure elapsed time. | 6 * A simple [Stopwatch] interface to measure elapsed time. |
| 7 */ | 7 */ |
| 8 abstract class Stopwatch { | 8 abstract class Stopwatch { |
| 9 /** | 9 /** |
| 10 * Creates a [Stopwatch] in stopped state with a zero elapsed count. | 10 * Creates a [Stopwatch] in stopped state with a zero elapsed count. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 void reset(); | 38 void reset(); |
| 39 | 39 |
| 40 /** | 40 /** |
| 41 * Returns the elapsed number of clock ticks since calling [start] while the | 41 * Returns the elapsed number of clock ticks since calling [start] while the |
| 42 * [Stopwatch] is running. | 42 * [Stopwatch] is running. |
| 43 * Returns the elapsed number of clock ticks between calling [start] and | 43 * Returns the elapsed number of clock ticks between calling [start] and |
| 44 * calling [stop]. | 44 * calling [stop]. |
| 45 * Returns 0 if the [Stopwatch] has never been started. | 45 * Returns 0 if the [Stopwatch] has never been started. |
| 46 * The elapsed number of clock ticks increases by [frequency] every second. | 46 * The elapsed number of clock ticks increases by [frequency] every second. |
| 47 */ | 47 */ |
| 48 int elapsed(); | 48 int get elapsedTicks; |
| 49 | 49 |
| 50 /** | 50 /** |
| 51 * Returns the [elapsed] counter converted to microseconds. | 51 * Returns the [elapsedTicks] counter converted to microseconds. |
| 52 */ | 52 */ |
| 53 int elapsedInUs(); | 53 int get elapsedMicroseconds; |
| 54 | 54 |
| 55 /** | 55 /** |
| 56 * Returns the [elapsed] counter converted to milliseconds. | 56 * Returns the [elapsedTicks] counter converted to milliseconds. |
| 57 */ | 57 */ |
| 58 int elapsedInMs(); | 58 int get elapsedMilliseconds; |
| 59 | 59 |
| 60 /** | 60 /** |
| 61 * Returns the frequency of the elapsed counter in Hz. | 61 * Returns the frequency of the elapsed counter in Hz. |
| 62 */ | 62 */ |
| 63 int frequency(); | 63 int get frequency; |
| 64 | |
| 65 } | 64 } |
| OLD | NEW |