Chromium Code Reviews| Index: sdk/lib/core/stopwatch.dart |
| =================================================================== |
| --- sdk/lib/core/stopwatch.dart (revision 32639) |
| +++ sdk/lib/core/stopwatch.dart (working copy) |
| @@ -8,6 +8,11 @@ |
| * A simple stopwatch interface to measure elapsed time. |
| */ |
| class Stopwatch { |
| + /** |
| + * Frequency of the elapsed counter in Hz. |
| + */ |
| + final int frequency = _frequency(); |
| + |
| // The _start and _stop fields capture the time when [start] and [stop] |
| // are called respectively. |
| // If _start is null, then the [Stopwatch] has not been started yet. |
| @@ -24,7 +29,7 @@ |
| * |
| * Stopwatch stopwatch = new Stopwatch()..start(); |
| */ |
| - Stopwatch() : _start = null, _stop = null {} |
| + Stopwatch() {} |
|
kasperl
2014/02/13 06:17:09
No need for the {}. You can replace that with ;.
siva
2014/02/13 17:06:39
Done.
|
| /** |
| * Starts the [Stopwatch]. |
| @@ -116,10 +121,6 @@ |
| return (elapsedTicks * 1000) ~/ frequency; |
| } |
| - /** |
| - * Returns the frequency of the elapsed counter in Hz. |
| - */ |
| - int get frequency => _frequency(); |
| /** |
| * Returns wether the [StopWatch] is currently running. |