| 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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |