os-rust/library/std
Tamir Duberstein bc300102d4
time: use clock_gettime on macos
Replace `mach_{absolute_time,timebase_info}` with
`clock_gettime(CLOCK_REALTIME)` on:

```
all(target_os = "macos", not(target_arch = "aarch64")),
    target_os = "ios",
    target_os = "watchos",
    target_os = "tvos"
))]
```

`mach_{absolute_time,timebase_info}` were first used in
cc367edd95
which predated the introduction of `clock_gettime` support in macOS
10.12 Sierra which became the minimum supported version in
58bbca958d.

Note that this change was made for aarch64 in
5008a317ce which predated 10.12 becoming
the minimum supported version. The discussion took place in
https://github.com/rust-lang/rust/issues/91417 and in particular
https://github.com/rust-lang/rust/issues/91417#issuecomment-992151582
and
https://github.com/rust-lang/rust/issues/91417#issuecomment-1033048064
are relevant.
2023-09-28 18:20:09 -04:00
..
benches mv std libs to library/ 2020-07-27 19:51:13 -05:00
src time: use clock_gettime on macos 2023-09-28 18:20:09 -04:00
tests Add data race test to std::env::{get, set} 2023-08-20 21:50:45 +02:00
build.rs Rebase to master 2023-09-22 17:23:33 +05:30
Cargo.toml Fixes from PR 2023-09-22 17:23:33 +05:30