Skip to content

Commit 2f246c0

Browse files
committed
general timer
1 parent 3b7c305 commit 2f246c0

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub fn solve_day(day: u8) {
5050
// 23 => solve!(day23),
5151
// 24 => solve!(day24),
5252
// 25 => solve!(day25),
53-
_ => println!("Day {day:02}\n not implemented!\n"),
53+
_ => (),
5454
}
5555
}
5656

src/main.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
use std::env;
1+
use std::{env, time::SystemTime};
22

33
mod helpers;
44
mod solutions;
55

66
fn main() {
7+
let time = SystemTime::now();
8+
79
// reading command line arguments
810
let args: Vec<String> = env::args().collect();
911

@@ -21,4 +23,9 @@ fn main() {
2123
helpers::solve_day(day);
2224
})
2325
}
26+
27+
println!(
28+
"total elapsed time: {} ms",
29+
time.elapsed().unwrap().as_millis()
30+
);
2431
}

0 commit comments

Comments
 (0)