Add an example displaying the current number of CPUs

This commit is contained in:
Emmanuel Gil Peyrot 2019-06-01 19:33:24 +00:00 committed by Sean McArthur
parent 4e0f34e764
commit 0f57018a0b

6
examples/values.rs Normal file
View File

@ -0,0 +1,6 @@
extern crate num_cpus;
fn main() {
println!("Logical CPUs: {}", num_cpus::get());
println!("Physical CPUs: {}", num_cpus::get_physical());
}