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 "async.dart"; | 5 part of "dart:async"; |
6 | 6 |
7 /** | 7 /** |
8 * A count-down timer that can be configured to fire once or repeatedly. | 8 * A count-down timer that can be configured to fire once or repeatedly. |
9 * | 9 * |
10 * The timer counts down from the specified duration to 0. | 10 * The timer counts down from the specified duration to 0. |
11 * When the timer reaches 0, the timer invokes the specified callback function. | 11 * When the timer reaches 0, the timer invokes the specified callback function. |
12 * Use a periodic timer to repeatedly count down the same interval. | 12 * Use a periodic timer to repeatedly count down the same interval. |
13 * | 13 * |
14 * A negative duration is treated the same as a duration of 0. | 14 * A negative duration is treated the same as a duration of 0. |
15 * If the duration is statically known to be 0, consider using [run]. | 15 * If the duration is statically known to be 0, consider using [run]. |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 * and the timer has not been canceled. | 102 * and the timer has not been canceled. |
103 * | 103 * |
104 * A periodic timer is active if it has not been canceled. | 104 * A periodic timer is active if it has not been canceled. |
105 */ | 105 */ |
106 bool get isActive; | 106 bool get isActive; |
107 | 107 |
108 external static Timer _createTimer(Duration duration, void callback()); | 108 external static Timer _createTimer(Duration duration, void callback()); |
109 external static Timer _createPeriodicTimer( | 109 external static Timer _createPeriodicTimer( |
110 Duration duration, void callback(Timer timer)); | 110 Duration duration, void callback(Timer timer)); |
111 } | 111 } |
OLD | NEW |