public class TimeMeasure {
public static void main(String arg[])
{
long startOperation = System.currentTimeMillis();
// Some operation
long endOperation = System.currentTimeMillis();
long timeTaken = endOperation - startOperation;
//long timeTaken = System.currentTimeMillis()-startOperation;
System.out.println("Time taken = "+timeTaken+" ms");
}
}
No comments:
Post a Comment