| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |