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

Unified Diff: samples/chat/chat_server_lib.dart

Issue 8992007: Make the repeating argument to timers optional. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 9 years 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_lib.dart
diff --git a/samples/chat/chat_server_lib.dart b/samples/chat/chat_server_lib.dart
index 883214c3104521337ddb48028c94e222f7fa7eca..97242aa73dc1dc2ade52a55cb4774529399f1707 100644
--- a/samples/chat/chat_server_lib.dart
+++ b/samples/chat/chat_server_lib.dart
@@ -591,7 +591,7 @@ class IsolatedServer extends Isolate {
// Start a timer for cleanup events.
_cleanupTimer =
- new Timer((timer) => _topic._handleTimer(timer), 10000, true);
+ new Timer.repeating((timer) => _topic._handleTimer(timer), 10000);
// Start timer for periodic logging.
void _handleLogging(Timer timer) {
@@ -619,7 +619,7 @@ class IsolatedServer extends Isolate {
_requestReceivedHandler(req, rsp),
backlog: message.backlog);
replyTo.send(new ChatServerStatus.started(_server.port), null);
- _loggingTimer = new Timer(_handleLogging, 1000, true);
+ _loggingTimer = new Timer.repeating(_handleLogging, 1000);
} catch (var e) {
replyTo.send(new ChatServerStatus.error(e.toString()), null);
}

Powered by Google App Engine
This is Rietveld 408576698