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

Unified Diff: samples/socket/SocketExample.dart

Issue 8992007: Make the repeating argument to timers optional. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed 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
« no previous file with comments | « samples/chat/http_impl.dart ('k') | tests/standalone/src/MultipleTimerTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/socket/SocketExample.dart
diff --git a/samples/socket/SocketExample.dart b/samples/socket/SocketExample.dart
index 5eed2e704e68b213a13cd7119e0e1902cb0d394c..66885d0427ae04991c1cdc79798a033b6d1440ee 100755
--- a/samples/socket/SocketExample.dart
+++ b/samples/socket/SocketExample.dart
@@ -46,14 +46,14 @@ class SocketExample {
}
// send next 4 bytes slowly
- new Timer((Timer t) {
+ new Timer.repeating((Timer t) {
sendByte();
if (bytesSent == bytesTotal) {
sendSocket.close();
t.cancel();
print("finished sending");
}
- }, 500, true );
+ }, 500);
}
void onConnect(Socket connection) {
« no previous file with comments | « samples/chat/http_impl.dart ('k') | tests/standalone/src/MultipleTimerTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698