elapsed
Get the elapsed time in nanoseconds. Depending on the state of the stopwatch, two values or an IllegalStateException may be thrown.
Stopwatch is still running: The elapsed time up to the point of calling this method is returned.
Stopwatch started and stopped: The elapsed time between the start and stop is returned.
Any other state: An IllegalStateException is thrown.
Return
The elapsed time in nanoseconds.
Author
Griefed
Throws
when the stopwatch is in an invalid state for time-retrieval.