Skip to content

Commit

Permalink
libstd: Use CLOCK_BOOTTIME for Instant
Browse files Browse the repository at this point in the history
Discussion is ongoing upstream at
rust-lang/rust#87906
about how exactly to make a change like this, but most of the concerns
(backwards compatibility, legacy kernels prior to 2.6.39, non-Linux
OSes) are not applicable to us.

If upstream decides to keep `Instant` as `CLOCK_MONOTONIC`, we should
figure out an alternate solution for our use of `quiche` before backing
this out.

Bug: 200694560
Change-Id: I3ad265f01064f14cddac815117406c5941a3b2ef
Merged-In: I8f7cd025c1ef9e1c7e89163d7d73220181b748ca
  • Loading branch information
maurer committed Nov 10, 2021
1 parent c6cbdb8 commit 98caf8b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ mod inner {

impl Instant {
pub fn now() -> Instant {
Instant { t: now(libc::CLOCK_MONOTONIC) }
Instant { t: now(libc::CLOCK_BOOTTIME) }
}

pub const fn zero() -> Instant {
Expand Down

0 comments on commit 98caf8b

Please sign in to comment.