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

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

Issue 12213092: Rework Timer interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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
« no previous file with comments | « tests/lib/async/slow_consumer2_test.dart ('k') | tests/lib/async/slow_consumer_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « tests/lib/async/slow_consumer2_test.dart ('k') | tests/lib/async/slow_consumer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698