mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-21 20:17:55 +00:00
Update Duration::from_secs doc example to show underlying values.
This commit is contained in:
parent
0634f0a30f
commit
aa10fce346
@ -84,7 +84,10 @@ impl Duration {
|
||||
/// ```
|
||||
/// use std::time::Duration;
|
||||
///
|
||||
/// let five_seconds = Duration::from_secs(5);
|
||||
/// let duration = Duration::from_secs(5);
|
||||
///
|
||||
/// assert_eq!(5, duration.as_secs());
|
||||
/// assert_eq!(0, duration.subsec_nanos());
|
||||
/// ```
|
||||
#[stable(feature = "duration", since = "1.3.0")]
|
||||
#[inline]
|
||||
|
Loading…
Reference in New Issue
Block a user