- Windows: Update windows-sys to 0.59.
- Deprecate
LoopHelper
. Instead use spin_sleep_util crate. - Windows: Use a high resolution waitable timer when available (>= Windows 10, version 1803).
- Windows: Replace winapi with windows-sys dependency.
- Windows: Remove once_cell dependency.
- Fix LoopHelper increment overflow handling.
- Expose fn
native_sleep
. - Add
SpinSleeper::with_spin_strategy
which allows specifying aSpinStrategy
. Previously thread yielding was always used. - Windows: Use
SpinStrategy::SpinLoopHint
by default (see #12).
- Use rust 1.38 duration_float methods to replace manual implementations.
- Use edition 2018.
- Windows: Replace lazy_static dependency with once_cell.
report_rate()
no longer eagerly reports on first call, as this is often inaccurate & unexpected.
- Add
spin_sleep::sleep
- Add
LoopHelper::set_target_rate
&LoopHelper::target_rate
- Improve documentation
- Use
std::thread::yield_now
in spin wait loops for efficiency - Add
Default
implementation forSpinSleeper
using OS-specific accuracy defaults