mirror of
https://github.com/rust-lang/rust
synced 2024-10-17 14:03:42 +00:00
6419151f8b
Fix non-associativity of `Instant` math on `aarch64-apple-darwin` targets This is a duplicate of #94100 (since the original author is unresponsive), which resolves #91417. On `aarch64-apple-darwin` targets, the internal resolution of `Instant` is lower than that of `Duration`, so math between them becomes non-associative with small-enough durations. This PR makes this target use the standard Unix implementation (where `Instant` has 1ns resolution), but with `CLOCK_UPTIME_RAW` so it still returns the same values as `mach_absolute_time`[^1]. (Edit: I need someone to confirm that this still works, I do not have access to an M1 device.) [^1]: https://www.manpagez.com/man/3/clock_gettime/ |
||
---|---|---|
.. | ||
alloc | ||
backtrace@07872f28cd | ||
core | ||
panic_abort | ||
panic_unwind | ||
portable-simd | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@790411f93c | ||
test | ||
unwind |