Chromium Code Reviews| Index: runtime/bin/timer_impl.dart |
| diff --git a/runtime/bin/timer_impl.dart b/runtime/bin/timer_impl.dart |
| index 78baa8c3fbe812d1944ba4070ce844cae6150ea4..d86df5a93c2b5ed5f9b3dc02c30fefd326ead114 100644 |
| --- a/runtime/bin/timer_impl.dart |
| +++ b/runtime/bin/timer_impl.dart |
| @@ -14,9 +14,9 @@ class _Timer implements Timer { |
| */ |
| static final int _NO_TIMER = -1; |
| - factory _Timer(void callback(Timer timer), |
| - int milliSeconds, |
| - bool repeating) { |
| + static Timer createTimer(void callback(Timer timer), |
|
Søren Gjesse
2011/12/19 12:31:36
_createTimer?
Mads Ager (google)
2011/12/19 12:34:37
Done.
|
| + int milliSeconds, |
| + bool repeating) { |
| EventHandler._start(); |
| if (_timers === null) { |
| _timers = new DoubleLinkedQueue<_Timer>(); |
| @@ -31,6 +31,14 @@ class _Timer implements Timer { |
| return timer; |
| } |
| + factory _Timer(void callback(Timer timer), int milliSeconds) { |
| + return createTimer(callback, milliSeconds, false); |
| + } |
| + |
| + factory _Timer.repeating(void callback(Timer timer), int milliSeconds) { |
| + return createTimer(callback, milliSeconds, true); |
| + } |
| + |
| _Timer._internal() {} |
| void _clear() { |