Index: sdk/lib/_internal/js_runtime/lib/isolate_helper.dart |
diff --git a/sdk/lib/_internal/js_runtime/lib/isolate_helper.dart b/sdk/lib/_internal/js_runtime/lib/isolate_helper.dart |
index 856a442bfec9452bd8d9e59b4028fd6d7adf0638..c12a746848bbc09d5bb255ba60978763ce08824d 100644 |
--- a/sdk/lib/_internal/js_runtime/lib/isolate_helper.dart |
+++ b/sdk/lib/_internal/js_runtime/lib/isolate_helper.dart |
@@ -1366,7 +1366,6 @@ class TimerImpl implements Timer { |
final bool _once; |
bool _inEventLoop = false; |
int _handle; |
- int _tick = 0; |
TimerImpl(int milliseconds, void callback()) : _once = true { |
if (milliseconds == 0 && (!hasTimer() || _globalState.isWorker)) { |
@@ -1392,7 +1391,6 @@ class TimerImpl implements Timer { |
void internalCallback() { |
_handle = null; |
leaveJsAsync(); |
- this._tick = 1; |
callback(); |
} |
@@ -1410,19 +1408,10 @@ class TimerImpl implements Timer { |
: _once = false { |
if (hasTimer()) { |
enterJsAsync(); |
- int start = JS('int', 'Date.now()'); |
_handle = JS( |
'int', |
'self.setInterval(#, #)', |
convertDartClosureToJS(() { |
- int tick = this._tick + 1; |
- if (milliseconds > 0) { |
- int duration = JS('int', 'Date.now()') - start; |
- if (duration > (tick + 1) * milliseconds) { |
- tick = duration ~/ milliseconds; |
- } |
- } |
- this._tick = tick; |
callback(this); |
}, 0), |
milliseconds); |
@@ -1431,8 +1420,6 @@ class TimerImpl implements Timer { |
} |
} |
- int get tick => _tick; |
- |
void cancel() { |
if (hasTimer()) { |
if (_inEventLoop) { |