Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std: time: Avoid to use "was created" in elapsed() description #108370

Merged
merged 1 commit into from
Feb 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions library/std/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ impl Instant {
self.checked_duration_since(earlier).unwrap_or_default()
}

/// Returns the amount of time elapsed since this instant was created.
/// Returns the amount of time elapsed since this instant.
///
/// # Panics
///
Expand Down Expand Up @@ -525,8 +525,8 @@ impl SystemTime {
self.0.sub_time(&earlier.0).map_err(SystemTimeError)
}

/// Returns the difference between the clock time when this
/// system time was created, and the current clock time.
/// Returns the difference from this system time to the
/// current clock time.
///
/// This function may fail as the underlying system clock is susceptible to
/// drift and updates (e.g., the system clock could go backwards), so this
Expand Down