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

Unified Diff: sdk/lib/io/http_session.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 | « sdk/lib/io/http_impl.dart ('k') | sdk/lib/io/list_stream_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_session.dart
diff --git a/sdk/lib/io/http_session.dart b/sdk/lib/io/http_session.dart
index b392297537834c76c2a6ce9636239bd0e5db347a..99bf13c23ebdf7dfd9a6d0ba77381e80f1e7c24a 100644
--- a/sdk/lib/io/http_session.dart
+++ b/sdk/lib/io/http_session.dart
@@ -125,7 +125,7 @@ class _HttpSessionManager {
session._next = session._prev = null;
}
- void _timerTimeout(_) {
+ void _timerTimeout() {
_stopTimer(); // Clear timer.
assert(_head != null);
var session = _head;
@@ -139,7 +139,8 @@ class _HttpSessionManager {
assert(_timer == null);
if (_head != null) {
int seconds = new DateTime.now().difference(_head.lastSeen).inSeconds;
- _timer = new Timer((_sessionTimeout - seconds) * 1000, _timerTimeout);
+ _timer = new Timer(new Duration(seconds: _sessionTimeout - seconds),
+ _timerTimeout);
}
}
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | sdk/lib/io/list_stream_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698