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

Unified Diff: utils/pub/utils.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 | « utils/pub/io.dart ('k') | utils/testrunner/pipeline_utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « utils/pub/io.dart ('k') | utils/testrunner/pipeline_utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698