Update src/main.rs
This commit is contained in:
parent
19f7c49e27
commit
ff6bc2c6f7
|
@ -9,7 +9,7 @@ use std::thread;
|
|||
// use std::sync::mpsc;
|
||||
use std::sync::{Arc, Barrier, RwLock};
|
||||
|
||||
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
|
||||
trait Stuff {
|
||||
|
@ -60,6 +60,7 @@ impl Iterator for Counter {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let start = Instant::now();
|
||||
let cpus: u8 = num_cpus::get() as u8;
|
||||
println!("{:?}", cpus);
|
||||
|
||||
|
@ -85,5 +86,6 @@ fn main() {
|
|||
});
|
||||
}
|
||||
barrier.wait();
|
||||
println!("Finding n = 10 took {:#?}", start.elapsed());
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue