I want to measure time (like stopwatch) of some code, what I did so far is :
TimeWatch watch = new TimeWatch();
watch = TimeWatch.start();
some code
double passedTimeInSeconds = (watch.time(TimeUnit.MILLISECONDS)) / 1000.0;
does these is the best option and the correct option to calculate the times?