| Index: runtime/lib/stopwatch_patch.dart
|
| diff --git a/runtime/lib/stopwatch_patch.dart b/runtime/lib/stopwatch_patch.dart
|
| index 2bdc2c531b01b6d4a8305400e393aaea3b8f2d19..e16005cab8652c6477803310a6e76e47eca74406 100644
|
| --- a/runtime/lib/stopwatch_patch.dart
|
| +++ b/runtime/lib/stopwatch_patch.dart
|
| @@ -5,9 +5,15 @@
|
| // A VM patch of the stopwatch part of dart:core.
|
|
|
| patch class Stopwatch {
|
| + /* patch */ static void _initTicker() {
|
| + if (_frequency == null) {
|
| + _frequency = _computeFrequency();
|
| + }
|
| + }
|
| +
|
| // Returns the current clock tick.
|
| /* patch */ static int _now() native "Stopwatch_now";
|
|
|
| // Returns the frequency of clock ticks in Hz.
|
| - /* patch */ static int _frequency() native "Stopwatch_frequency";
|
| + static int _computeFrequency() native "Stopwatch_frequency";
|
| }
|
|
|