I have a button named Check In. My aim is on click to change the text and start counting the time. The timer has to stop at the next click. It should give the t
I think it is better practice to use System.nanoTime() instead of System.currentTimeMillis(), as currentTimeMillis() relies on what time the system's clock is set to, which can be changed.
nanoTime(), however, is really designed to measure elapsed time according to the JavaDoc.