Index: sdk/lib/async/stream_impl.dart |
diff --git a/sdk/lib/async/stream_impl.dart b/sdk/lib/async/stream_impl.dart |
index caa6318f858c0f99bba21171566e28340c6f4e0d..af68d43ea1a2376f3083d0997d6a4742678c2fbe 100644 |
--- a/sdk/lib/async/stream_impl.dart |
+++ b/sdk/lib/async/stream_impl.dart |
@@ -1026,7 +1026,7 @@ abstract class _PendingEvents { |
void schedule(_StreamImpl stream) { |
if (isScheduled) return; |
- scheduleTimer = new Timer(0, (_) { |
+ scheduleTimer = Timer.run(() { |
scheduleTimer = null; |
stream._handlePendingEvents(); |
}); |
@@ -1084,7 +1084,7 @@ class _DoneSubscription<T> implements StreamSubscription<T> { |
void _delayDone() { |
assert(_timer == null && _pauseCount == 0); |
- _timer = new Timer(0, (_) { |
+ _timer = Timer.run(() { |
if (_handler != null) _handler(); |
}); |
} |