| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 "core.dart"; | 5 part of "dart:core"; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * A span of time, such as 27 days, 4 hours, 12 minutes, and 3 seconds. | 8 * A span of time, such as 27 days, 4 hours, 12 minutes, and 3 seconds. |
| 9 * | 9 * |
| 10 * A `Duration` represents a difference from one point in time to another. The | 10 * A `Duration` represents a difference from one point in time to another. The |
| 11 * duration may be "negative" if the difference is from a later time to an | 11 * duration may be "negative" if the difference is from a later time to an |
| 12 * earlier. | 12 * earlier. |
| 13 * | 13 * |
| 14 * Durations are context independent. For example, a duration of 2 days is | 14 * Durations are context independent. For example, a duration of 2 days is |
| 15 * always 48 hours, even when it is added to a `DateTime` just when the | 15 * always 48 hours, even when it is added to a `DateTime` just when the |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 | 289 |
| 290 /** | 290 /** |
| 291 * Returns a new `Duration` representing this `Duration` negated. | 291 * Returns a new `Duration` representing this `Duration` negated. |
| 292 * | 292 * |
| 293 * The returned `Duration` has the same length as this one, but will have the | 293 * The returned `Duration` has the same length as this one, but will have the |
| 294 * opposite sign of this one. | 294 * opposite sign of this one. |
| 295 */ | 295 */ |
| 296 // Using subtraction helps dart2js avoid negative zeros. | 296 // Using subtraction helps dart2js avoid negative zeros. |
| 297 Duration operator -() => new Duration._microseconds(0 - _duration); | 297 Duration operator -() => new Duration._microseconds(0 - _duration); |
| 298 } | 298 } |
| OLD | NEW |