We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0634f0a commit aa10fceCopy full SHA for aa10fce
src/libstd/time/duration.rs
@@ -84,7 +84,10 @@ impl Duration {
84
/// ```
85
/// use std::time::Duration;
86
///
87
- /// let five_seconds = Duration::from_secs(5);
+ /// let duration = Duration::from_secs(5);
88
+ ///
89
+ /// assert_eq!(5, duration.as_secs());
90
+ /// assert_eq!(0, duration.subsec_nanos());
91
92
#[stable(feature = "duration", since = "1.3.0")]
93
#[inline]
0 commit comments