Skip to content

Commit d8285a3

Browse files
committed
---
yaml --- r: 128215 b: refs/heads/try c: 49a40d8 h: refs/heads/master i: 128213: a051b0c 128211: bcef2fe 128207: 58dad12 v: v3
1 parent a8ca731 commit d8285a3

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
@@ -2,7 +2,7 @@
22
refs/heads/master: cb9c1e0e702f4a1a5dfc909b15b74e8556013c06
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: aa98b25c4f0c10729dff37c699904ad57b8fbda8
5-
refs/heads/try: 31281b4bd12bb4bbd52a23a29f59a3398cca1a8f
5+
refs/heads/try: 49a40d8ad15b69410f24423d86954268d1f1503b
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/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)