| 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 // Patch file for the dart:async library. | 5 // Patch file for the dart:async library. |
| 6 | 6 |
| 7 import 'dart:_js_helper' show | 7 import 'dart:_js_helper' show |
| 8 patch, | 8 patch, |
| 9 Primitives, | 9 Primitives, |
| 10 convertDartClosureToJS, | 10 convertDartClosureToJS, |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 } | 114 } |
| 115 | 115 |
| 116 @patch | 116 @patch |
| 117 static Timer _createPeriodicTimer(Duration duration, | 117 static Timer _createPeriodicTimer(Duration duration, |
| 118 void callback(Timer timer)) { | 118 void callback(Timer timer)) { |
| 119 int milliseconds = duration.inMilliseconds; | 119 int milliseconds = duration.inMilliseconds; |
| 120 if (milliseconds < 0) milliseconds = 0; | 120 if (milliseconds < 0) milliseconds = 0; |
| 121 return new TimerImpl.periodic(milliseconds, callback); | 121 return new TimerImpl.periodic(milliseconds, callback); |
| 122 } | 122 } |
| 123 } | 123 } |
| 124 | |
| 125 bool get _hasDocument => JS('String', 'typeof document') == 'object'; | |
| OLD | NEW |