Index: pkg/scheduled_test/test/utils.dart |
diff --git a/pkg/scheduled_test/test/utils.dart b/pkg/scheduled_test/test/utils.dart |
index bd87edf3414b50bb22cf6713a3729c3966b6f896..42f5c22a9b1ae84010da2af1451a37460d822996 100644 |
--- a/pkg/scheduled_test/test/utils.dart |
+++ b/pkg/scheduled_test/test/utils.dart |
@@ -22,7 +22,7 @@ export 'package:scheduled_test/src/utils.dart'; |
Future timeout(Future input, int milliseconds, onTimeout()) { |
Lasse Reichstein Nielsen
2013/02/28 11:14:48
Not changing "int milliseconds" to "Duration durat
floitsch
2013/02/28 13:24:05
It's not really in my code. But I would like it to
|
bool completed = false; |
var completer = new Completer(); |
- var timer = new Timer(milliseconds, (_) { |
+ var timer = new Timer(new Duration(milliseconds: milliseconds), () { |
completed = true; |
chainToCompleter(new Future.immediate(null).then((_) => onTimeout()), |
completer); |
@@ -42,7 +42,7 @@ Future timeout(Future input, int milliseconds, onTimeout()) { |
/// Returns a [Future] that will complete in [milliseconds]. |
Future sleep(int milliseconds) { |
var completer = new Completer(); |
- mock_clock.newTimer(new Duration(milliseconds: milliseconds), (_) { |
+ mock_clock.newTimer(new Duration(milliseconds: milliseconds), () { |
completer.complete(); |
}); |
return completer.future; |