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

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

Issue 68233003: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 library engine.utilities.general; 4 library engine.utilities.general;
5
4 import 'java_core.dart'; 6 import 'java_core.dart';
7
5 /** 8 /**
6 * Helper for measuring how much time is spent doing some operation. 9 * Helper for measuring how much time is spent doing some operation.
7 */ 10 */
8 class TimeCounter { 11 class TimeCounter {
9 int result = 0; 12 int result = 0;
10 13
11 /** 14 /**
12 * Starts counting time. 15 * Starts counting time.
13 * 16 *
14 * @return the [TimeCounterHandle] that should be used to stop counting. 17 * @return the [TimeCounterHandle] that should be used to stop counting.
15 */ 18 */
16 TimeCounter_TimeCounterHandle start() => new TimeCounter_TimeCounterHandle(thi s); 19 TimeCounter_TimeCounterHandle start() => new TimeCounter_TimeCounterHandle(thi s);
17 } 20 }
21
18 /** 22 /**
19 * The handle object that should be used to stop and update counter. 23 * The handle object that should be used to stop and update counter.
20 */ 24 */
21 class TimeCounter_TimeCounterHandle { 25 class TimeCounter_TimeCounterHandle {
22 final TimeCounter TimeCounter_this; 26 final TimeCounter TimeCounter_this;
27
23 int _startTime = JavaSystem.currentTimeMillis(); 28 int _startTime = JavaSystem.currentTimeMillis();
29
24 TimeCounter_TimeCounterHandle(this.TimeCounter_this); 30 TimeCounter_TimeCounterHandle(this.TimeCounter_this);
25 31
26 /** 32 /**
27 * Stops counting time and updates counter. 33 * Stops counting time and updates counter.
28 */ 34 */
29 void stop() { 35 void stop() {
30 { 36 {
31 TimeCounter_this.result += JavaSystem.currentTimeMillis() - _startTime; 37 TimeCounter_this.result += JavaSystem.currentTimeMillis() - _startTime;
32 } 38 }
33 } 39 }
34 } 40 }
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