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

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: Move break on new line. 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
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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 } else { 426 } else {
427 if (warnings > 0) { 427 if (warnings > 0) {
428 info('compilation completed successfully with $warnings warnings'); 428 info('compilation completed successfully with $warnings warnings');
429 } else { 429 } else {
430 info('compilation completed sucessfully'); 430 info('compilation completed sucessfully');
431 } 431 }
432 } 432 }
433 } 433 }
434 434
435 withTiming(String name, f()) { 435 withTiming(String name, f()) {
436 final sw = new StopWatch(); 436 final sw = new Stopwatch();
437 sw.start(); 437 sw.start();
438 var result = f(); 438 var result = f();
439 sw.stop(); 439 sw.stop();
440 info('$name in ${sw.elapsedInMs()}msec'); 440 info('$name in ${sw.elapsedInMs()}msec');
441 return result; 441 return result;
442 } 442 }
443 } 443 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698