Possible Duplicate:
Calculating time difference in Milliseconds
How i can check how many milliseconds passed in some event in java? For example:
Want to start timer here<<
function doSomething()
.
.
Want to finish timer here<<
I want to check how many milliseconds passed. Is there a way to do it?
System.nanoTime()
and compare the start value to end value. Here is the doc.
Returns the current value of the most precise available system timer, in nanoseconds.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With