Skip to content

Commit 98caf8b

Browse files
committed
libstd: Use CLOCK_BOOTTIME for Instant
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
1 parent c6cbdb8 commit 98caf8b

File tree

1 file changed

+1
-1
lines changed
  • linux-x86/1.51.0/src/stdlibs/library/std/src/sys/unix

1 file changed

+1
-1
lines changed

linux-x86/1.51.0/src/stdlibs/library/std/src/sys/unix/time.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ mod inner {
293293

294294
impl Instant {
295295
pub fn now() -> Instant {
296-
Instant { t: now(libc::CLOCK_MONOTONIC) }
296+
Instant { t: now(libc::CLOCK_BOOTTIME) }
297297
}
298298

299299
pub const fn zero() -> Instant {

0 commit comments

Comments
 (0)