rust/library/std
Matthias Krüger 6419151f8b
Rollup merge of #103594 - maniwani:fix-issue-91417, r=thomcc
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/
2022-11-18 14:13:36 +01:00
..
benches
primitive_docs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
src Rollup merge of #103594 - maniwani:fix-issue-91417, r=thomcc 2022-11-18 14:13:36 +01:00
tests Sort target features alphabetically 2022-10-14 22:01:18 +02:00
build.rs Library changes for Apple WatchOS 2022-07-20 08:57:36 +01:00
Cargo.toml Update compiler-builtins 2022-11-13 23:07:35 +05:30