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

Unified Diff: samples/chat/chat_server.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 | « runtime/lib/timer_patch.dart ('k') | samples/chat/chat_server_lib.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/chat/chat_server.dart
diff --git a/samples/chat/chat_server.dart b/samples/chat/chat_server.dart
index eae7ccf0cb765f62eee99c5ccb3fef8988143d9d..537068b14bef9b983f0be6e8104e3e041f2d093f 100644
--- a/samples/chat/chat_server.dart
+++ b/samples/chat/chat_server.dart
@@ -22,6 +22,6 @@ void main() {
// Start a shutdown timer if requested.
if (stopAfter != null) {
- new Timer(stopAfter * 1000, (timer) => serverMain.shutdown());
+ new Timer(new Duration(seconds: stopAfter), serverMain.shutdown);
}
}
« no previous file with comments | « runtime/lib/timer_patch.dart ('k') | samples/chat/chat_server_lib.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698