Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 97 additions & 46 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions rand_jitter/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.6.1] - 2026-05-16
### Changes
- Migrate from `winapi` to `windows-sys`

## [0.6.0] - 2026-02-01
### Changes
- Use Edition 2024 and MSRV 1.85 ([#73])
Expand Down
4 changes: 2 additions & 2 deletions rand_jitter/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rand_jitter"
version = "0.6.0"
version = "0.6.1"
authors = ["The Rand Project Developers"]
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand Down Expand Up @@ -28,4 +28,4 @@ log = { version = "0.4.4", optional = true }
libc = { version = "0.2", default-features = false }

[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "0.3", features = ["profileapi"] }
windows-sys = { version = "0.59", features = ["Win32_System_Performance"] }
8 changes: 3 additions & 5 deletions rand_jitter/src/platform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ pub fn get_nstime() -> u64 {

#[cfg(target_os = "windows")]
pub fn get_nstime() -> u64 {
use winapi;

let mut t = 0i64;
unsafe {
let mut t = super::mem::zeroed();
winapi::um::profileapi::QueryPerformanceCounter(&mut t);
*t.QuadPart() as u64
windows_sys::Win32::System::Performance::QueryPerformanceCounter(&mut t);
}
t as u64
}
Loading