mirror of
https://github.com/openharmony/third_party_rust_num_cpus.git
synced 2026-06-30 20:47:54 -04:00
Add an example displaying the current number of CPUs
This commit is contained in:
committed by
Sean McArthur
parent
285e6fc0a0
commit
0acb24f0cf
@@ -0,0 +1,6 @@
|
||||
extern crate num_cpus;
|
||||
|
||||
fn main() {
|
||||
println!("Logical CPUs: {}", num_cpus::get());
|
||||
println!("Physical CPUs: {}", num_cpus::get_physical());
|
||||
}
|
||||
Reference in New Issue
Block a user