Index: tests/lib/async/slow_consumer3_test.dart |
diff --git a/tests/lib/async/slow_consumer3_test.dart b/tests/lib/async/slow_consumer3_test.dart |
index 0f8084b57ee5dcf7f46a792c3d366e8726ea318f..24386add57f1f82fc4ac8512b2ebd8bcb4ab982a 100644 |
--- a/tests/lib/async/slow_consumer3_test.dart |
+++ b/tests/lib/async/slow_consumer3_test.dart |
@@ -35,7 +35,8 @@ class SlowConsumer extends StreamConsumer { |
subscription.pause(); |
usedBufferSize = 0; |
int ms = data.length * 1000 ~/ bytesPerSecond; |
- new Timer(ms, (_) { |
+ Duration duration = new Duration(milliseconds: ms); |
+ new Timer(duration, () { |
for (int i = 0; i < currentBufferedDataLength; i++) { |
bufferedData[i] = null; |
} |