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 285e6fc0a0
commit 0acb24f0cf
+6
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());
}