Skip to content

Commit 0081424

Browse files
committed
---
yaml --- r: 127749 b: refs/heads/snap-stage3 c: 49a40d8 h: refs/heads/master i: 127747: 09ff9a0 v: v3
1 parent 3c6aa1e commit 0081424

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 49a970f2449a78f28b6c301e542d38593094ca77
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 31281b4bd12bb4bbd52a23a29f59a3398cca1a8f
4+
refs/heads/snap-stage3: 49a40d8ad15b69410f24423d86954268d1f1503b
55
refs/heads/try: d9c23fcbaea89871667272a67ecb8d3a512162f3
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libstd/time/duration.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,10 @@ impl Duration {
119119
Duration { nanos: nanos as u32, ..Duration::seconds(secs) }
120120
}
121121

122-
/// Same as `to_tuple` but returns a tuple compatible to `to_negated_tuple`.
122+
/// Returns a tuple of the number of days, (non-leap) seconds and
123+
/// nanoseconds in the duration. Note that the number of seconds
124+
/// and nanoseconds are always positive, so that for example
125+
/// `-Duration::seconds(3)` has -1 days and 86,397 seconds.
123126
#[inline]
124127
fn to_tuple_64(&self) -> (i64, u32, u32) {
125128
(self.days as i64, self.secs, self.nanos)
@@ -170,7 +173,7 @@ impl Duration {
170173
self.num_seconds() / 60
171174
}
172175

173-
/// Returns the total number of (non-leap) whole seconds in the duration.
176+
/// Returns the total number of whole seconds in the duration.
174177
pub fn num_seconds(&self) -> i64 {
175178
// cannot overflow, 2^32 * 86400 < 2^64
176179
fn secs((days, secs, _): (i64, u32, u32)) -> i64 {

0 commit comments

Comments
 (0)