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

Unified Diff: samples/chat/chat_server_lib.dart

Issue 9597015: Update Timer API to take the callback as the last parameter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « samples/chat/chat_server.dart ('k') | samples/socket/SocketExample.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/chat/chat_server_lib.dart
diff --git a/samples/chat/chat_server_lib.dart b/samples/chat/chat_server_lib.dart
index 833755cb4cf55b2545f32f0b0f97c9a7c86a7ef0..6b2bd728105f0e22e4cd5a1f8746fafef31c44ae 100644
--- a/samples/chat/chat_server_lib.dart
+++ b/samples/chat/chat_server_lib.dart
@@ -566,7 +566,7 @@ class IsolatedServer extends Isolate {
// Start a timer for cleanup events.
_cleanupTimer =
- new Timer.repeating((timer) => _topic._handleTimer(timer), 10000);
+ new Timer.repeating(10000, (timer) => _topic._handleTimer(timer));
// Start timer for periodic logging.
void _handleLogging(Timer timer) {
@@ -590,7 +590,7 @@ class IsolatedServer extends Isolate {
_server.onRequest = (HttpRequest req, HttpResponse rsp) =>
_requestReceivedHandler(req, rsp);
replyTo.send(new ChatServerStatus.started(_server.port), null);
- _loggingTimer = new Timer.repeating(_handleLogging, 1000);
+ _loggingTimer = new Timer.repeating(1000, _handleLogging);
} catch (var e) {
replyTo.send(new ChatServerStatus.error(e.toString()), null);
}
« no previous file with comments | « samples/chat/chat_server.dart ('k') | samples/socket/SocketExample.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698