From ff6bc2c6f7df57927bf5adb60a3852bd5dd7a6c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B8vbr=C3=B8tte=20Olsen?= Date: Mon, 25 Mar 2019 22:20:15 +0000 Subject: [PATCH] Update src/main.rs --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; }