Better timing logs in previous days

This commit is contained in:
2020-12-10 01:23:58 -05:00
parent 646539557f
commit 180e6743a6
9 changed files with 58 additions and 28 deletions

View File

@@ -1,7 +1,8 @@
use anyhow::Result;
use std::collections::{HashMap, HashSet};
use std::fs::read_to_string;
use std::time::Instant;
use anyhow::Result;
const INPUT: &str = "input/input.txt";
@@ -44,8 +45,13 @@ fn solve_part2(input_path: &str) -> Result<usize> {
}
fn main() {
let mut now = Instant::now();
println!("Part 1: {}", solve_part1(INPUT).unwrap());
println!("(elapsed: {:?})", now.elapsed());
now = Instant::now();
println!("");
println!("Part 2: {}", solve_part2(INPUT).unwrap());
println!("(elapsed: {:?})", now.elapsed());
}
#[cfg(test)]