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

Side by Side Diff: frog/world.dart

Issue 8537011: Rename StopWatch to Stopwatch. Add new Stopwatch.start() and Stopwatch.reset(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 9 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 | « frog/leg/scanner/scanner_bench.dart ('k') | tests/co19/co19-compiler.status » ('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 /** The one true [World]. */ 5 /** The one true [World]. */
6 World world; 6 World world;
7 7
8 /** 8 /**
9 * Should be called exactly once to setup singleton world. 9 * Should be called exactly once to setup singleton world.
10 * Can use world.reset() to reinitialize. 10 * Can use world.reset() to reinitialize.
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 } else { 430 } else {
431 if (warnings > 0) { 431 if (warnings > 0) {
432 info('compilation completed successfully with $warnings warnings'); 432 info('compilation completed successfully with $warnings warnings');
433 } else { 433 } else {
434 info('compilation completed sucessfully'); 434 info('compilation completed sucessfully');
435 } 435 }
436 } 436 }
437 } 437 }
438 438
439 withTiming(String name, f()) { 439 withTiming(String name, f()) {
440 final sw = new StopWatch(); 440 final sw = new Stopwatch();
441 sw.start(); 441 sw.start();
442 var result = f(); 442 var result = f();
443 sw.stop(); 443 sw.stop();
444 info('$name in ${sw.elapsedInMs()}msec'); 444 info('$name in ${sw.elapsedInMs()}msec');
445 return result; 445 return result;
446 } 446 }
447 } 447 }
OLDNEW
« no previous file with comments | « frog/leg/scanner/scanner_bench.dart ('k') | tests/co19/co19-compiler.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698