| OLD | NEW |
| 1 library java.core; | 1 library java.core; |
| 2 | 2 |
| 3 import "dart:math" as math; | |
| 4 | |
| 5 final Stopwatch nanoTimeStopwatch = new Stopwatch(); | 3 final Stopwatch nanoTimeStopwatch = new Stopwatch(); |
| 6 | 4 |
| 7 const int LONG_MAX_VALUE = 0x7fffffffffffffff; | 5 const int LONG_MAX_VALUE = 0x7fffffffffffffff; |
| 8 | 6 |
| 9 class JavaSystem { | 7 class JavaSystem { |
| 10 static int currentTimeMillis() { | 8 static int currentTimeMillis() { |
| 11 return (new DateTime.now()).millisecondsSinceEpoch; | 9 return (new DateTime.now()).millisecondsSinceEpoch; |
| 12 } | 10 } |
| 13 | 11 |
| 14 static int nanoTime() { | 12 static int nanoTime() { |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 * format('{0} are you {1}ing?', ['What', 'read']) = 'What are you reading?' | 454 * format('{0} are you {1}ing?', ['What', 'read']) = 'What are you reading?' |
| 457 */ | 455 */ |
| 458 String formatList(String pattern, List args) { | 456 String formatList(String pattern, List args) { |
| 459 return pattern.replaceAllMapped(new RegExp(r'\{(\d+)\}'), (match) { | 457 return pattern.replaceAllMapped(new RegExp(r'\{(\d+)\}'), (match) { |
| 460 String indexStr = match.group(1); | 458 String indexStr = match.group(1); |
| 461 int index = int.parse(indexStr); | 459 int index = int.parse(indexStr); |
| 462 var arg = args[index]; | 460 var arg = args[index]; |
| 463 return arg != null ? arg.toString() : null; | 461 return arg != null ? arg.toString() : null; |
| 464 }); | 462 }); |
| 465 } | 463 } |
| OLD | NEW |