| OLD | NEW |
| 1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
| 2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
| 4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 /** | 6 /** |
| 7 * Script to compile each dart web component examples and copy the | 7 * Script to compile each dart web component examples and copy the |
| 8 * generated code to an output directory. | 8 * generated code to an output directory. |
| 9 */ | 9 */ |
| 10 library build_examples; | 10 library build_examples; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 } | 77 } |
| 78 | 78 |
| 79 | 79 |
| 80 final String GREEN_COLOR = '\u001b[32m'; | 80 final String GREEN_COLOR = '\u001b[32m'; |
| 81 final String NO_COLOR = '\u001b[0m'; | 81 final String NO_COLOR = '\u001b[0m'; |
| 82 | 82 |
| 83 Stopwatch startTime() => new Stopwatch()..start(); | 83 Stopwatch startTime() => new Stopwatch()..start(); |
| 84 | 84 |
| 85 void stopTime(Stopwatch watch, String message) { | 85 void stopTime(Stopwatch watch, String message) { |
| 86 watch.stop(); | 86 watch.stop(); |
| 87 var duration = watch.elapsedInMs(); | 87 var duration = watch.elapsedMilliseconds; |
| 88 print('$message: $GREEN_COLOR$duration ms$NO_COLOR'); | 88 print('$message: $GREEN_COLOR$duration ms$NO_COLOR'); |
| 89 totalTime.add('$message: $GREEN_COLOR$duration ms$NO_COLOR'); | 89 totalTime.add('$message: $GREEN_COLOR$duration ms$NO_COLOR'); |
| 90 } | 90 } |
| OLD | NEW |