Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Side by Side Diff: lib/core/stopwatch.dart

Issue 10948009: Revert 12494. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/core/set.dart ('k') | lib/core/string_buffer.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 interface Stopwatch default StopwatchImplementation {
9
9 /** 10 /**
10 * Creates a [Stopwatch] in stopped state with a zero elapsed count. 11 * Creates a [Stopwatch] in stopped state with a zero elapsed count.
11 * 12 *
12 * The following example shows how to start a [Stopwatch] 13 * The following example shows how to start a [Stopwatch]
13 * right after allocation. 14 * right after allocation.
14 * 15 *
15 * Stopwatch stopwatch = new Stopwatch()..start(); 16 * Stopwatch stopwatch = new Stopwatch()..start();
16 */ 17 */
17 factory Stopwatch() => new StopwatchImplementation(); 18 Stopwatch();
18 19
19 /** 20 /**
20 * Starts the [Stopwatch]. The [elapsed] count is increasing monotonically. 21 * Starts the [Stopwatch]. The [elapsed] count is increasing monotonically.
21 * If the [Stopwatch] has been stopped, then calling start again restarts it 22 * If the [Stopwatch] has been stopped, then calling start again restarts it
22 * without resetting the [elapsed] count. 23 * without resetting the [elapsed] count.
23 * If the [Stopwatch] is currently running, then calling start does nothing. 24 * If the [Stopwatch] is currently running, then calling start does nothing.
24 */ 25 */
25 void start(); 26 void start();
26 27
27 /** 28 /**
(...skipping 28 matching lines...) Expand all
56 * Returns the [elapsed] counter converted to milliseconds. 57 * Returns the [elapsed] counter converted to milliseconds.
57 */ 58 */
58 int elapsedInMs(); 59 int elapsedInMs();
59 60
60 /** 61 /**
61 * Returns the frequency of the elapsed counter in Hz. 62 * Returns the frequency of the elapsed counter in Hz.
62 */ 63 */
63 int frequency(); 64 int frequency();
64 65
65 } 66 }
OLDNEW
« no previous file with comments | « lib/core/set.dart ('k') | lib/core/string_buffer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698