use POWSolver in example

This commit is contained in:
b1ek 2023-08-02 20:45:06 +10:00
parent abe8659823
commit 9af5bc0269
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,7 @@
use std::time::Instant;
use powlib::{self, gen::{POWRange, POWChallenge}, hash::hash_num, num::Num};
use powlib::{self, gen::{POWRange, POWChallenge}, hash::hash_num, num::Num, solver::POWSolver};
fn main() {
{
@ -13,6 +13,7 @@ fn main() {
{
let time = Instant::now();
let challenge = POWChallenge::make(POWRange::new(0, 20480));
println!("Solvling {} took {} seconds", challenge.solve_singlethread(), time.elapsed().as_secs_f32());
let mut solver = POWSolver::new(challenge);
println!("Solvling {} took {} seconds", solver.solve_signle().unwrap(), time.elapsed().as_secs_f32());
}
}