add timing to Equix.verify()

This commit is contained in:
zzz
2024-01-26 09:55:04 -05:00
parent 09af344490
commit e1b10fa1ef

View File

@ -84,6 +84,7 @@ public class Equix {
}
public static Result verify(HXCtx ctx, byte[] challenge, int csz, char[] solution) {
long start = System.nanoTime();
if (!verify_order(solution)) {
/*
char[] s = solution;
@ -121,6 +122,9 @@ public class Equix {
} else if (ctx.code_size != REQUIREMENT_SIZE) {
throw new IllegalArgumentException("code size is " + ctx.code_size);
}
return verify_internal(ctx, solution);
Result rv = verify_internal(ctx, solution);
long now = System.currentTimeMillis();
System.out.println("Verify result: " + rv + " took " + ((System.nanoTime() - start) / 1000) + " us");
return rv;
}
}