pub mod days; extern crate scan_fmt; use std::time::Instant; fn main() { //days::d03::solve() _all_days() } #[allow(unreachable_code, unused)] fn _all_days() { let start = Instant::now(); let mut time = start.clone(); println!("\nDay 1"); days::d01::solve(); time = _print_elapsed(time); println!("\nDay 2"); days::d02::solve(); time = _print_elapsed(time); println!("\nDay 3"); days::d03::solve(); time = _print_elapsed(time); println!("\nDay 4"); days::d04::solve(); time = _print_elapsed(time); /* println!("\nDay 5"); days::d05::solve(); time = _print_elapsed(time); println!("\nDay 6"); days::d06::solve(); time = _print_elapsed(time); println!("\nDay 7"); days::d07::solve(); time = _print_elapsed(time); println!("\nDay 8"); days::d08::solve(); time = _print_elapsed(time); println!("\nDay 9"); days::d09::solve(); time = _print_elapsed(time); println!("\nDay 10"); days::d10::solve(); time = _print_elapsed(time); println!("\nDay 11"); days::d11::solve(); time = _print_elapsed(time); println!("\nDay 12"); days::d12::solve(); time = _print_elapsed(time); println!("\nDay 13"); days::d13::solve(); time = _print_elapsed(time); println!("\nDay 14"); days::d14::solve(); time = _print_elapsed(time); println!("\nDay 15"); days::d15::solve(); time = _print_elapsed(time); println!("\nDay 16"); days::d16::solve(); time = _print_elapsed(time); println!("\nDay 17"); days::d17::solve(); time = _print_elapsed(time); println!("\nDay 18"); days::d18::solve(); time = _print_elapsed(time); println!("\nDay 19"); days::d19::solve(); time = _print_elapsed(time); println!("\nDay 20"); days::d20::solve(); time = _print_elapsed(time); println!("\nDay 21"); days::d21::solve(); time = _print_elapsed(time); println!("\nDay 22"); days::d22::solve(); time = _print_elapsed(time); println!("\nDay 23"); days::d23::solve(); time = _print_elapsed(time); println!("\nDay 24"); days::d24::solve(); time = _print_elapsed(time); println!("\nDay 25"); days::d25::solve(); _print_elapsed(time);*/ println!("\nTotal elapsed: {}ms", start.elapsed().as_millis()) } fn _print_elapsed(time: Instant) -> Instant { println!( " Elapsed: {}.{}ms", time.elapsed().as_millis(), time.elapsed().as_micros() % 1000 ); Instant::now() }