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

Unified Diff: pkg/scheduled_test/lib/src/value_future.dart

Issue 91213002: Add Future.timeout. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update indentation. Created 7 years, 1 month 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 | « pkg/scheduled_test/lib/src/substitute_future.dart ('k') | sdk/lib/_internal/pub/lib/src/error_group.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/scheduled_test/lib/src/value_future.dart
diff --git a/pkg/scheduled_test/lib/src/value_future.dart b/pkg/scheduled_test/lib/src/value_future.dart
index a7d65171e45070de6ff01133b1b11430a7877b05..3821feb674369d8a6a82ee13407017e09969f771 100644
--- a/pkg/scheduled_test/lib/src/value_future.dart
+++ b/pkg/scheduled_test/lib/src/value_future.dart
@@ -35,4 +35,6 @@ class ValueFuture<T> implements Future<T> {
Future then(onValue(T value), {Function onError}) =>
_future.then(onValue, onError: onError);
Future<T> whenComplete(action()) => _future.whenComplete(action);
+ Future timeout(Duration timeLimit, [void onTimeout()]) =>
+ _future.timeout(timeLimit, onTimeout);
}
« no previous file with comments | « pkg/scheduled_test/lib/src/substitute_future.dart ('k') | sdk/lib/_internal/pub/lib/src/error_group.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698