Rollup merge of #76162 - abrausch:documentation-fix-duration_since, r=jyn514
Make duration_since documentation more clear
This commit is contained in:
commit
87302a297c
@ -460,12 +460,13 @@ impl SystemTime {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// ```no_run
|
||||
/// use std::time::SystemTime;
|
||||
///
|
||||
/// let sys_time = SystemTime::now();
|
||||
/// let difference = sys_time.duration_since(sys_time)
|
||||
/// .expect("Clock may have gone backwards");
|
||||
/// let new_sys_time = SystemTime::now();
|
||||
/// let difference = new_sys_time.duration_since(sys_time)
|
||||
/// .expect("Clock may have gone backwards");
|
||||
/// println!("{:?}", difference);
|
||||
/// ```
|
||||
#[stable(feature = "time2", since = "1.8.0")]
|
||||
|
Loading…
Reference in New Issue
Block a user