time tracking
This commit is contained in:
parent
4f191d8689
commit
cda502d79c
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user