Package gr.zeus.util
Class SimpleTimerNanos
java.lang.Object
gr.zeus.util.SimpleTimerNanos
A very simple timer for timing java method calls and other processes
(JDK 5, nanos implementation).
- Since:
- 1.06
- Author:
- Gregory Kotsaftis
-
Constructor Details
-
SimpleTimerNanos
public SimpleTimerNanos()Constructor.
-
-
Method Details
-
reset
public void reset()Resets the timer. -
start
public void start()Starts timing a job. -
elapsedNanos
public long elapsedNanos()Gets elapsed time in nanoseconds.- Returns:
- The elapsed time in nanoseconds.
-
elapsedMillis
public double elapsedMillis()Gets elapsed time in milliseconds.- Returns:
- The elapsed time in milliseconds.
-
elapsedSeconds
public double elapsedSeconds()Gets elapsed time in seconds.- Returns:
- The elapsed time in seconds.
-