about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src
diff options
context:
space:
mode:
authordvdsk <noreply@davidsk.dev>2025-05-31 15:33:46 +0200
committerdvdsk <noreply@davidsk.dev>2025-07-06 17:36:49 +0200
commitf24ee2c9b15dc3734e9ebd74ba0563a1e6c545db (patch)
tree6b8ace653301356d698114d42424806510998147 /compiler/rustc_const_eval/src
parent35f6036521777bdc0dcea1f980be4c192962a168 (diff)
downloadrust-f24ee2c9b15dc3734e9ebd74ba0563a1e6c545db.tar.gz
rust-f24ee2c9b15dc3734e9ebd74ba0563a1e6c545db.zip
sleep_until: use clock_nanosleep where possible
Using clock nanosleep leads to more accurate sleep times on platforms
where it is supported.

To enable using clock_nanosleep this makes `sleep_until` platform
specific. That unfortunatly requires identical placeholder
implementations for the other platforms (windows/mac/wasm etc).

we will land platform specific implementations for those later. See the
`sleep_until` tracking issue.

This requires an accessors for the Instant type. As that accessor is only
used on the platforms that have clock_nanosleep it is marked as allow_unused.

32bit time_t targets do not use clock_nanosleep atm, they instead rely
on the same placeholder as the other platforms. We could make them
use clock_nanosleep too in the future using `__clock_nanosleep_time64`.

__clock_nanosleep_time64 is documented at:
https://www.gnu.org/software/libc/manual/html_node/64_002dbit-time-symbol-handling.html
Diffstat (limited to 'compiler/rustc_const_eval/src')
0 files changed, 0 insertions, 0 deletions