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

Side by Side Diff: pkg/analyzer/lib/src/generated/utilities_general.dart

Issue 109853003: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for review comments. Created 7 years 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 | « pkg/analyzer/lib/src/generated/utilities_dart.dart ('k') | pkg/analyzer/pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // This code was auto-generated, is not intended to be edited, and is subject to 1 // This code was auto-generated, is not intended to be edited, and is subject to
2 // significant change. Please see the README file for more information. 2 // significant change. Please see the README file for more information.
3 3
4 library engine.utilities.general; 4 library engine.utilities.general;
5 5
6 import 'java_core.dart'; 6 import 'java_core.dart';
7 7
8 /** 8 /**
9 * Helper for measuring how much time is spent doing some operation. 9 * Helper for measuring how much time is spent doing some operation.
10 */ 10 */
11 class TimeCounter { 11 class TimeCounter {
12 int result = 0; 12 int _result = 0;
13
14 /**
15 * @return the number of milliseconds spent between [start] and [stop].
16 */
17 int get result => _result;
13 18
14 /** 19 /**
15 * Starts counting time. 20 * Starts counting time.
16 * 21 *
17 * @return the [TimeCounterHandle] that should be used to stop counting. 22 * @return the [TimeCounterHandle] that should be used to stop counting.
18 */ 23 */
19 TimeCounter_TimeCounterHandle start() => new TimeCounter_TimeCounterHandle(thi s); 24 TimeCounter_TimeCounterHandle start() => new TimeCounter_TimeCounterHandle(thi s);
20 } 25 }
21 26
22 /** 27 /**
23 * The handle object that should be used to stop and update counter. 28 * The handle object that should be used to stop and update counter.
24 */ 29 */
25 class TimeCounter_TimeCounterHandle { 30 class TimeCounter_TimeCounterHandle {
26 final TimeCounter TimeCounter_this; 31 final TimeCounter TimeCounter_this;
27 32
28 int _startTime = JavaSystem.currentTimeMillis(); 33 int _startTime = JavaSystem.currentTimeMillis();
29 34
30 TimeCounter_TimeCounterHandle(this.TimeCounter_this); 35 TimeCounter_TimeCounterHandle(this.TimeCounter_this);
31 36
32 /** 37 /**
33 * Stops counting time and updates counter. 38 * Stops counting time and updates counter.
34 */ 39 */
35 void stop() { 40 void stop() {
36 { 41 {
37 TimeCounter_this.result += JavaSystem.currentTimeMillis() - _startTime; 42 TimeCounter_this._result += JavaSystem.currentTimeMillis() - _startTime;
38 } 43 }
39 } 44 }
40 } 45 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/utilities_dart.dart ('k') | pkg/analyzer/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698