| Index: sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart b/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
|
| index 161ebf1e5b89006302e41c8adcff9c1744840a3d..ad8d98c36270294e1cba181592e2c88446c1bcc2 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
|
| @@ -535,6 +535,17 @@ class Primitives {
|
|
|
| static num dateNow() => JS('num', r'Date.now()');
|
|
|
| + static num numMicroseconds() {
|
| + if (JS('bool', 'typeof window != "undefined" && window !== null')) {
|
| + var performance = JS('var', 'window.performance');
|
| + if (performance != null &&
|
| + JS('bool', 'typeof #.webkitNow == "function"', performance)) {
|
| + return JS('num', '#.webkitNow()', performance);
|
| + }
|
| + }
|
| + return 1000 * dateNow();
|
| + }
|
| +
|
| // This is to avoid stack overflows due to very large argument arrays in
|
| // apply(). It fixes http://dartbug.com/6919
|
| static String _fromCharCodeApply(List<int> array) {
|
|
|