better resolution for Hashx.make() time
This commit is contained in:
@ -26,7 +26,7 @@ public class HashX {
|
|||||||
* @return success
|
* @return success
|
||||||
*/
|
*/
|
||||||
public static boolean make(HXCtx ctx, byte[] seed, int size) {
|
public static boolean make(HXCtx ctx, byte[] seed, int size) {
|
||||||
long start = System.currentTimeMillis();
|
long start = System.nanoTime();
|
||||||
if (ctx.state != CompiledState.REQUESTED)
|
if (ctx.state != CompiledState.REQUESTED)
|
||||||
ctx.state = CompiledState.INIT;
|
ctx.state = CompiledState.INIT;
|
||||||
ctx.compiled_method = null;
|
ctx.compiled_method = null;
|
||||||
@ -51,7 +51,7 @@ public class HashX {
|
|||||||
//System.out.println("init ekeys");
|
//System.out.println("init ekeys");
|
||||||
//print_registers("exec key", ctx.keys, 4);
|
//print_registers("exec key", ctx.keys, 4);
|
||||||
boolean rv = Program.generate(pkeys, ctx);
|
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:");
|
//System.out.println("program:");
|
||||||
//print_program(ctx);
|
//print_program(ctx);
|
||||||
return rv;
|
return rv;
|
||||||
|
Reference in New Issue
Block a user