| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of dart.io; |
| 6 |
| 5 class _Timer implements Timer { | 7 class _Timer implements Timer { |
| 6 // Set jitter to wake up timer events that would happen in _TIMER_JITTER ms. | 8 // Set jitter to wake up timer events that would happen in _TIMER_JITTER ms. |
| 7 static const int _TIMER_JITTER = 0; | 9 static const int _TIMER_JITTER = 0; |
| 8 | 10 |
| 9 // Disables the timer. | 11 // Disables the timer. |
| 10 static const int _NO_TIMER = -1; | 12 static const int _NO_TIMER = -1; |
| 11 | 13 |
| 12 static Timer _createTimer(void callback(Timer timer), | 14 static Timer _createTimer(void callback(Timer timer), |
| 13 int milliSeconds, | 15 int milliSeconds, |
| 14 bool repeating) { | 16 bool repeating) { |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 _getTimerFactoryClosure() { | 193 _getTimerFactoryClosure() { |
| 192 return (int milliSeconds, void callback(Timer timer), bool repeating) { | 194 return (int milliSeconds, void callback(Timer timer), bool repeating) { |
| 193 if (repeating) { | 195 if (repeating) { |
| 194 return new _Timer.repeating(milliSeconds, callback); | 196 return new _Timer.repeating(milliSeconds, callback); |
| 195 } | 197 } |
| 196 return new _Timer(milliSeconds, callback); | 198 return new _Timer(milliSeconds, callback); |
| 197 }; | 199 }; |
| 198 } | 200 } |
| 199 | 201 |
| 200 | 202 |
| OLD | NEW |