doc: add a pause
This commit is contained in:
parent
d447ceaedb
commit
44665c4e61
1 changed files with 3 additions and 2 deletions
|
@ -94,8 +94,9 @@ impl Instant {
|
||||||
///
|
///
|
||||||
/// # Panics
|
/// # Panics
|
||||||
///
|
///
|
||||||
/// This function may panic if the current time is earlier than this instant
|
/// This function may panic if the current time is earlier than this
|
||||||
/// which can happen if an `Instant` is produced synthetically.
|
/// instant, which is something that can happen if an `Instant` is
|
||||||
|
/// produced synthetically.
|
||||||
pub fn elapsed(&self) -> Duration {
|
pub fn elapsed(&self) -> Duration {
|
||||||
Instant::now().duration_from_earlier(*self)
|
Instant::now().duration_from_earlier(*self)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue