Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1444)

Unified Diff: tests/lib/async/slow_consumer_test.dart

Issue 12224081: Change Future.delayed to take a Duration. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove const Duration(). Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698