Index: tests/standalone/io/socket_close_test.dart |
diff --git a/tests/standalone/io/socket_close_test.dart b/tests/standalone/io/socket_close_test.dart |
index 426f45a557c688fbbfb741981105016f3b24e158..3dddf4efbef5c96f9e4e985fc7ecb708ab1dd27c 100644 |
--- a/tests/standalone/io/socket_close_test.dart |
+++ b/tests/standalone/io/socket_close_test.dart |
@@ -33,13 +33,13 @@ class SocketClose { |
void proceed() { |
if (_iterations < ITERATIONS) { |
- new Timer(0, sendData); |
+ Timer.run(sendData); |
} else { |
shutdown(); |
} |
} |
- void sendData(Timer timer) { |
+ void sendData() { |
void dataHandler() { |
switch (_mode) { |
@@ -296,7 +296,7 @@ class SocketCloseServer { |
Expect.fail("Server socket error"); |
} |
- waitForResult(Timer timer) { |
+ waitForResult() { |
// Make sure all iterations have been run. In multiple of these |
// scenarios it is possible to get the SERVERSHUTDOWN message |
// before we have received the last close event on the |
@@ -332,7 +332,7 @@ class SocketCloseServer { |
port.close(); |
_donePort.send(null); |
} else { |
- new Timer(100, waitForResult); |
+ new Timer(new Duration(milliseconds: 100), waitForResult); |
} |
} |
@@ -354,7 +354,7 @@ class SocketCloseServer { |
_server.onError = errorHandlerServer; |
replyTo.send(_server.port, null); |
} else { |
- new Timer(0, waitForResult); |
+ Timer.run(waitForResult); |
} |
} |