mirror of
https://gitee.com/openharmony/third_party_rust_num_cpus
synced 2024-11-23 05:29:41 +00:00
Add an example displaying the current number of CPUs
This commit is contained in:
parent
4e0f34e764
commit
0f57018a0b
6
examples/values.rs
Normal file
6
examples/values.rs
Normal file
@ -0,0 +1,6 @@
|
||||
extern crate num_cpus;
|
||||
|
||||
fn main() {
|
||||
println!("Logical CPUs: {}", num_cpus::get());
|
||||
println!("Physical CPUs: {}", num_cpus::get_physical());
|
||||
}
|
Loading…
Reference in New Issue
Block a user