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

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

Issue 1944413006: Updates for core/{pattern,regexp,stopwatch,duration}.dart (Closed) Base URL: https://github.com/dart-lang/dev_compiler@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « tool/input_sdk/lib/core/regexp.dart ('k') | no next file » | 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 part of dart.core; 5 part of dart.core;
6 6
7 /** 7 /**
8 * A simple stopwatch interface to measure elapsed time. 8 * A simple stopwatch interface to measure elapsed time.
9 */ 9 */
10 class Stopwatch { 10 class Stopwatch {
11 /** 11 /**
12 * Frequency of the elapsed counter in Hz. 12 * Frequency of the elapsed counter in Hz.
13 */ 13 */
14 int get frequency => _frequency; 14 int get frequency => _frequency;
15 15
16 // The _start and _stop fields capture the time when [start] and [stop] 16 // The _start and _stop fields capture the time when [start] and [stop]
17 // are called respectively. 17 // are called respectively.
18 // If _start is null, then the [Stopwatch] has not been started yet. 18 // If _start is null, then the [Stopwatch] has not been started yet.
19 // If _stop is null, then the [Stopwatch] has not been stopped yet, 19 // If _stop is null, then the [Stopwatch] has not been stopped yet,
20 // or is running. 20 // or is running.
21 num _start; 21 int _start;
22 num _stop; 22 int _stop;
23 23
24 /** 24 /**
25 * Creates a [Stopwatch] in stopped state with a zero elapsed count. 25 * Creates a [Stopwatch] in stopped state with a zero elapsed count.
26 * 26 *
27 * The following example shows how to start a [Stopwatch] 27 * The following example shows how to start a [Stopwatch]
28 * immediately after allocation. 28 * immediately after allocation.
29 * 29 *
30 * Stopwatch stopwatch = new Stopwatch()..start(); 30 * Stopwatch stopwatch = new Stopwatch()..start();
31 */ 31 */
32 Stopwatch() { 32 Stopwatch() {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 */ 134 */
135 static int _frequency; 135 static int _frequency;
136 136
137 /** 137 /**
138 * Initializes the time-measuring system. *Must* initialize the [_frequency] 138 * Initializes the time-measuring system. *Must* initialize the [_frequency]
139 * variable. 139 * variable.
140 */ 140 */
141 external static void _initTicker(); 141 external static void _initTicker();
142 external static int _now(); 142 external static int _now();
143 } 143 }
OLDNEW
« no previous file with comments | « tool/input_sdk/lib/core/regexp.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698