Chromium Code Reviews| Index: lib/core/stopwatch.dart |
| =================================================================== |
| --- lib/core/stopwatch.dart (revision 11786) |
| +++ lib/core/stopwatch.dart (working copy) |
| @@ -9,15 +9,15 @@ |
| /** |
| * Creates a [Stopwatch] in stopped state with a zero elapsed count. |
| + * |
| + * The following example shows how to start a [Stopwatch] |
| + * right after allocation. |
| + * |
| + * Stopwatch stopwatch = new Stopwatch()..start(); |
| */ |
| Stopwatch(); |
| /** |
| - * Creates a [Stopwatch] in started state with a zero elapsed count. |
| - */ |
| - Stopwatch.start(); |
|
kasperl
2012/09/04 08:11:59
Personally, I like naming constructor like these s
|
| - |
| - /** |
| * Starts the [Stopwatch]. The [elapsed] count is increasing monotonically. |
| * If the [Stopwatch] has been stopped, then calling start again restarts it |
| * without resetting the [elapsed] count. |