Index: tests/lib/async/slow_consumer_test.dart |
diff --git a/tests/lib/async/slow_consumer_test.dart b/tests/lib/async/slow_consumer_test.dart |
index dcc616714ad9d1dc449f2a42e54780daa5901cf9..4b149244ab4a02fe44ce3172e0d656c188f969c5 100644 |
--- a/tests/lib/async/slow_consumer_test.dart |
+++ b/tests/lib/async/slow_consumer_test.dart |
@@ -28,8 +28,9 @@ class SlowConsumer extends StreamConsumer { |
.then((count) { |
// Simulated amount of time it takes to handle the data. |
int ms = data.length * 1000 ~/ bytesPerSecond; |
+ Duration duration = new Duration(milliseconds: ms); |
subscription.pause(); |
- return new Future.delayed(ms, () { |
+ return new Future.delayed(duration, () { |
subscription.resume(); |
// Make sure we use data here to keep tracking it. |
return count + data.length; |