better resolution for Hashx.make() time

This commit is contained in:
zzz
2024-01-26 10:09:06 -05:00
parent b1b2e863b8
commit be815233c9

View File

@ -26,7 +26,7 @@ public class HashX {
* @return success
*/
public static boolean make(HXCtx ctx, byte[] seed, int size) {
long start = System.currentTimeMillis();
long start = System.nanoTime();
if (ctx.state != CompiledState.REQUESTED)
ctx.state = CompiledState.INIT;
ctx.compiled_method = null;
@ -51,7 +51,7 @@ public class HashX {
//System.out.println("init ekeys");
//print_registers("exec key", ctx.keys, 4);
boolean rv = Program.generate(pkeys, ctx);
System.out.println("make() for id " + ctx.name + " took " + (System.currentTimeMillis() - start));
System.out.println("make() for id " + ctx.name + " took " + ((System.nanoTime() - start) / 1000) + " us");
//System.out.println("program:");
//print_program(ctx);
return rv;