| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 @patch | 107 @patch |
| 108 static Timer _createPeriodicTimer(Duration duration, | 108 static Timer _createPeriodicTimer(Duration duration, |
| 109 void callback(Timer timer)) { | 109 void callback(Timer timer)) { |
| 110 int milliseconds = duration.inMilliseconds; | 110 int milliseconds = duration.inMilliseconds; |
| 111 if (milliseconds < 0) milliseconds = 0; | 111 if (milliseconds < 0) milliseconds = 0; |
| 112 return new TimerImpl.periodic(milliseconds, callback); | 112 return new TimerImpl.periodic(milliseconds, callback); |
| 113 } | 113 } |
| 114 } | 114 } |
| 115 | 115 |
| 116 bool get _hasDocument => JS('String', 'typeof document') == 'object'; | 116 bool get _hasDocument => JS('String', 'typeof document') == 'object'; |
| OLD | NEW |