Index: utils/pub/utils.dart |
diff --git a/utils/pub/utils.dart b/utils/pub/utils.dart |
index 38fa49027fea01d6622cdf17863a4fa91f0545ad..729f55a0e0235380dad5be8198df6cbcc95ceb09 100644 |
--- a/utils/pub/utils.dart |
+++ b/utils/pub/utils.dart |
@@ -158,7 +158,7 @@ Future defer(callback()) { |
/// Returns a [Future] that completes in [milliseconds]. |
Future sleep(int milliseconds) { |
var completer = new Completer(); |
- new Timer(milliseconds, (_) => completer.complete()); |
+ new Timer(new Duration(milliseconds: milliseconds), completer.complete); |
return completer.future; |
} |