time tracking

This commit is contained in:
ddidderr 2022-07-19 08:20:15 +02:00
parent 4f191d8689
commit cda502d79c
Signed by: ddidderr
GPG Key ID: 3841F1C27E6F0E14

View File

@ -1,3 +1,5 @@
use std::time::Instant;
struct SField {
field: Vec<usize>,
fixed: Vec<usize>,
@ -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());
}
}