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

Unified Diff: pkg/scheduled_test/test/utils.dart

Issue 12342014: Remove deprecated ms arguments for Timer and Future. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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: 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;

Powered by Google App Engine
This is Rietveld 408576698