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

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

Issue 23904009: added one-liners: Node, EventTarget, Canvas, HttpClient, HttpServer etc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: lgtm'ed by katwa Created 7 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 | « sdk/lib/core/double.dart ('k') | sdk/lib/html/dart2js/html_dart2js.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 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 // The _start and _stop fields capture the time when [start] and [stop] 11 // The _start and _stop fields capture the time when [start] and [stop]
12 // are called respectively. 12 // are called respectively.
13 // If _start is null, then the [Stopwatch] has not been started yet. 13 // If _start is null, then the [Stopwatch] has not been started yet.
14 // If _stop is null, then the [Stopwatch] has not been stopped yet, 14 // If _stop is null, then the [Stopwatch] has not been stopped yet,
15 // or is running. 15 // or is running.
16 int _start; 16 int _start;
17 int _stop; 17 int _stop;
18 18
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 int get frequency => _frequency(); 122 int get frequency => _frequency();
123 123
124 /** 124 /**
125 * Returns wether the [StopWatch] is currently running. 125 * Returns wether the [StopWatch] is currently running.
126 */ 126 */
127 bool get isRunning => _start != null && _stop == null; 127 bool get isRunning => _start != null && _stop == null;
128 128
129 external static int _frequency(); 129 external static int _frequency();
130 external static int _now(); 130 external static int _now();
131 } 131 }
OLDNEW
« no previous file with comments | « sdk/lib/core/double.dart ('k') | sdk/lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698