| Index: lib/isolate/timer_hook.dart
|
| diff --git a/lib/isolate/timer.dart b/lib/isolate/timer_hook.dart
|
| similarity index 66%
|
| copy from lib/isolate/timer.dart
|
| copy to lib/isolate/timer_hook.dart
|
| index 76f98a1c2cd610ed00ffdbb84d6a6c1b65be3363..37286ac5f24e3a1b04ec3dde2696aeddbda73b71 100644
|
| --- a/lib/isolate/timer.dart
|
| +++ b/lib/isolate/timer_hook.dart
|
| @@ -2,28 +2,6 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -interface Timer default _TimerFactory {
|
| - /**
|
| - * Creates a new timer. The [callback] callback is invoked after
|
| - * [milliSeconds] milliseconds.
|
| - */
|
| - Timer(int milliSeconds, void callback(Timer timer));
|
| -
|
| - /**
|
| - * Creates a new repeating timer. The [callback] is invoked every
|
| - * [milliSeconds] millisecond until cancelled.
|
| - */
|
| - Timer.repeating(int milliSeconds, void callback(Timer timer));
|
| -
|
| - /**
|
| - * Cancels the timer.
|
| - */
|
| - void cancel();
|
| -}
|
| -
|
| -// TODO(ajohnsen): Patch timer once we have support for patching named
|
| -// factory constructors in the VM.
|
| -
|
| typedef Timer _TimerFactoryClosure(int milliSeconds,
|
| void callback(Timer timer),
|
| bool repeating);
|
| @@ -31,6 +9,7 @@ typedef Timer _TimerFactoryClosure(int milliSeconds,
|
| // _TimerFactory provides a hook which allows various implementations of this
|
| // library to provide a concrete class for the Timer interface.
|
| class _TimerFactory {
|
| +
|
| factory Timer(int milliSeconds, void callback(Timer timer)) {
|
| if (_factory == null) {
|
| throw new UnsupportedOperationException("Timer interface not supported.");
|
|
|