about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-10-24 04:15:39 +0000
committerbors <bors@rust-lang.org>2023-10-24 04:15:39 +0000
commite918db897df677d9bbda64d82ebbb8f1bc9e557f (patch)
tree855c0c8e9f55fb0578bcecd6997416cd39ca0b2f /compiler/rustc_trait_selection/src
parentf1a5ce19f5aa0cf61ed7b9f75b30e610befeed72 (diff)
parentbc300102d4388860afa895149c1f52393a7aa964 (diff)
downloadrust-e918db897df677d9bbda64d82ebbb8f1bc9e557f.tar.gz
rust-e918db897df677d9bbda64d82ebbb8f1bc9e557f.zip
Auto merge of #116238 - tamird:gettimeofday, r=thomcc
time: use clock_gettime on macos

Replace `gettimeofday` with `clock_gettime(CLOCK_REALTIME)` on:

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

`gettimeofday` was first used in
https://github.com/time-rs/time/commit/cc367edd953e72756ed6f0980918795c11e469b1
which predated the introduction of `clock_gettime` support in macOS
10.12 Sierra which became the minimum supported version in
58bbca958d917a89124da248735926f86c59a149.

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
https://github.com/time-rs/time/commit/cc367edd953e72756ed6f0980918795c11e469b1
which predated the introduction of `clock_gettime` support in macOS
10.12 Sierra which became the minimum supported version in
58bbca958d917a89124da248735926f86c59a149.

Note that this change was made for aarch64 in
5008a317ce8e508c390ed12bff281f307313376e 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.
Diffstat (limited to 'compiler/rustc_trait_selection/src')
0 files changed, 0 insertions, 0 deletions