public class Stopwatch
extends java.lang.Object
Stopwatch time is elapsed (wall-clock) time, not process or CPU time. Stopwatch time resolution is one nanosecond. In other words, a stopwatch cannot measure a time difference less than one nanosecond. On the other hand, the granularity of the stopwatch depends on the underlying operating system and may be larger.
System.nanoTime()
Constructor and Description |
---|
Stopwatch() |
public void start()
public void stop()
public void reset()
public void restart()
public double time()