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

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: Use stopwatch. 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: samples/chat/chat_server.dart
diff --git a/samples/chat/chat_server.dart b/samples/chat/chat_server.dart
index eae7ccf0cb765f62eee99c5ccb3fef8988143d9d..6bd87899b6ba2b12db71abe77fc3ec5403b7d7fb 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(const Duration(seconds: stopAfter), serverMain.shutdown);
Lasse Reichstein Nielsen 2013/02/11 13:01:21 This can't be const. Is this code tested?
floitsch 2013/02/11 19:21:32 strange. I will make sure to run all the tests. do
}
}

Powered by Google App Engine
This is Rietveld 408576698