rust/library/std
bors cee6db171d Auto merge of #116461 - ChrisDenton:sleep, r=thomcc
Windows: Support sub-millisecond sleep

Use `CreateWaitableTimerExW` with `CREATE_WAITABLE_TIMER_HIGH_RESOLUTION`. Does not work before Windows 10, version 1803 so in that case we fallback to using `Sleep`.

I've created a `WaitableTimer` type so it can one day be adapted to also support waiting to an absolute time (which has been talked about). Note though that it currently returns `Err(())` because we can't do anything with the errors other than fallback to the old `Sleep`. Feel free to tell me to do errors properly. It just didn't seem worth constructing an `io::Error` if we're never going to surface it to the user. And it *should* all be infallible anyway unless the OS is too old to support it.

Closes #43376
2023-10-24 11:14:15 +00:00
..
benches
src Auto merge of #116461 - ChrisDenton:sleep, r=thomcc 2023-10-24 11:14:15 +00:00
tests Add data race test to std::env::{get, set} 2023-08-20 21:50:45 +02:00
build.rs changes from feedback 2023-10-20 23:55:14 +01:00
Cargo.toml Auto merge of #116527 - sthibaul:libc, r=Mark-Simulacrum 2023-10-15 15:17:17 +00:00