Sunday, 26 April 2015

Time taken to run a java program


****Time taken to run a program*****


Can be used in scheduled tasks in OIM for performance considerations.

long startTimer = System.nanoTime();
long endTimer = System.nanoTime();
System.out.print("Time to run this  "+(endTimer - startTimer)+"ns");

No comments:

Post a Comment