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

Side by Side Diff: utils/template/world.dart

Issue 11265024: Make methods in Stopwatch getters and rename to be more consistent. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. Created 8 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 | « utils/template/tool.dart ('k') | utils/tests/string_encoding/benchmark_runner.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** The one true [World]. */ 5 /** The one true [World]. */
6 World world; 6 World world;
7 7
8 typedef void MessageHandler(String prefix, String message, SourceSpan span); 8 typedef void MessageHandler(String prefix, String message, SourceSpan span);
9 typedef void PrintHandler(String message); 9 typedef void PrintHandler(String message);
10 10
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 151 }
152 } 152 }
153 153
154 bool get hasErrors => errors > 0; 154 bool get hasErrors => errors > 0;
155 155
156 withTiming(String name, f()) { 156 withTiming(String name, f()) {
157 final sw = new Stopwatch(); 157 final sw = new Stopwatch();
158 sw.start(); 158 sw.start();
159 var result = f(); 159 var result = f();
160 sw.stop(); 160 sw.stop();
161 info('$name in ${sw.elapsedInMs()}msec'); 161 info('$name in ${sw.elapsedMilliseconds}msec');
162 return result; 162 return result;
163 } 163 }
164 } 164 }
165 165
166 String _GREEN_COLOR = '\u001b[32m'; 166 String _GREEN_COLOR = '\u001b[32m';
167 String _RED_COLOR = '\u001b[31m'; 167 String _RED_COLOR = '\u001b[31m';
168 String _MAGENTA_COLOR = '\u001b[35m'; 168 String _MAGENTA_COLOR = '\u001b[35m';
169 String _NO_COLOR = '\u001b[0m'; 169 String _NO_COLOR = '\u001b[0m';
OLDNEW
« no previous file with comments | « utils/template/tool.dart ('k') | utils/tests/string_encoding/benchmark_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698