| Index: sdk/lib/async/timer.dart
|
| diff --git a/sdk/lib/async/timer.dart b/sdk/lib/async/timer.dart
|
| index 3544728ece9ad5f242f97da7d80a2104ca8e89a9..bfa7ced29b445ca1f0dba4f742b1a339203b8282 100644
|
| --- a/sdk/lib/async/timer.dart
|
| +++ b/sdk/lib/async/timer.dart
|
| @@ -29,9 +29,7 @@ abstract class Timer {
|
| * Note: If Dart code using Timer is compiled to JavaScript, the finest
|
| * granularity available in the browser is 4 milliseconds.
|
| */
|
| - factory Timer(Duration duration, void callback()) {
|
| - return _Zone.current.createTimer(duration, callback);
|
| - }
|
| + external factory Timer(Duration duration, void callback());
|
|
|
| /**
|
| * Creates a new repeating timer.
|
| @@ -39,10 +37,8 @@ abstract class Timer {
|
| * The [callback] is invoked repeatedly with [duration] intervals until
|
| * canceled. A negative duration is treated similar to a duration of 0.
|
| */
|
| - factory Timer.periodic(Duration duration,
|
| - void callback(Timer timer)) {
|
| - return _Zone.current.createPeriodicTimer(duration, callback);
|
| - }
|
| + external factory Timer.periodic(Duration duration,
|
| + void callback(Timer timer));
|
|
|
| /**
|
| * Runs the given [callback] asynchronously as soon as possible.
|
| @@ -58,7 +54,3 @@ abstract class Timer {
|
| */
|
| void cancel();
|
| }
|
| -
|
| -external Timer _createTimer(Duration duration, void callback());
|
| -external Timer _createPeriodicTimer(Duration duration,
|
| - void callback(Timer timer));
|
|
|