about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@gmail.com>2023-09-28 17:34:41 -0400
committerTamir Duberstein <tamird@gmail.com>2023-09-28 18:20:09 -0400
commitbc300102d4388860afa895149c1f52393a7aa964 (patch)
treee06ab8e5fff3cb38a26d187c2766dab673d42363 /tests/codegen/src-hash-algorithm
parentb21eb4f046284040b8e91aff0fd1e7c5125864d1 (diff)
downloadrust-bc300102d4388860afa895149c1f52393a7aa964.tar.gz
rust-bc300102d4388860afa895149c1f52393a7aa964.zip
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
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 'tests/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions