diff --git a/src/main.rs b/src/main.rs index 3750167..6e3b6b5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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; }