Use nanoTime instead of System.currentTimeInMillis()
Refer: http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/System.html#nanoTime()
Especially useful when we are not really looking for a wall clock definition (current time) but are doing endTime-StartTime.
Especially useful when we are not really looking for a wall clock definition (current time) but are doing endTime-StartTime.
Comments
Post a Comment