Skip to content

A toy program for checking the resolution of Rust's std::time::Instant.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

greeble-dev/instant_resolution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A toy program for checking the resolution of Rust's std::time::Instant. Use only for entertainment.

git clone https://github.com/greeble-dev/instant_resolution.git
cd instant_resolution
cargo run --release

Measured: 100ns
OS: 100ns (windows/x86_64, QueryPerformanceFrequency = 10000000)

The measured time is from simply calling Instant::now() in a loop until it increases. The OS time is from taking a guess at the OS API that Instant might be using.

About

A toy program for checking the resolution of Rust's std::time::Instant.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Languages