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

Unified Diff: samples/chat/chat_server_lib.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 | « samples/chat/chat_server.dart ('k') | sdk/lib/_internal/compiler/implementation/lib/async_patch.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 68ebc8da92049e052f31ced41f8bdad01840f7da..b9845322d691f5f9b3f95f97b50778243950f830 100644
--- a/samples/chat/chat_server_lib.dart
+++ b/samples/chat/chat_server_lib.dart
@@ -534,8 +534,8 @@ class IsolatedServer {
_messageRate = new Rate();
// Start a timer for cleanup events.
- _cleanupTimer =
- new Timer.repeating(10000, (timer) => _topic._handleTimer(timer));
+ _cleanupTimer = new Timer.repeating(const Duration(seconds: 10),
+ _topic._handleTimer);
}
// Start timer for periodic logging.
@@ -591,7 +591,8 @@ class IsolatedServer {
try {
_server.listen(_host, _port, backlog: message.backlog);
replyTo.send(new ChatServerStatus.started(_server.port), null);
- _loggingTimer = new Timer.repeating(1000, _handleLogging);
+ _loggingTimer =
+ new Timer.repeating(const Duration(seconds: 1), _handleLogging);
} catch (e) {
replyTo.send(new ChatServerStatus.error2(e.toString()), null);
}
« no previous file with comments | « samples/chat/chat_server.dart ('k') | sdk/lib/_internal/compiler/implementation/lib/async_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698