From cda502d79c630095d3d5d7d3a79864fa27363ce0 Mon Sep 17 00:00:00 2001 From: ddidderr Date: Tue, 19 Jul 2022 08:20:15 +0200 Subject: [PATCH] time tracking --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index e83f928..1d728f1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,5 @@ +use std::time::Instant; + struct SField { field: Vec, fixed: Vec, @@ -401,9 +403,11 @@ impl SField { #[inline(always)] fn solve(&mut self) { + let now = Instant::now(); if !self.solve_backtracking() { println!("there is no solution."); } + println!("took {:.3}s", now.elapsed().as_secs_f64()); } }