public final class Stopwatch
extends java.lang.Object
Constructor and Description |
---|
Stopwatch()
When created, the stopwatch is running by default.
|
Stopwatch(boolean start) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the stopwatch without restarting it.
|
long |
elapsedMillis() |
double |
elapsedSeconds() |
java.lang.String |
format() |
java.lang.String |
format(int digits) |
void |
reset()
Clears and restarts the stopwatch.
|
long |
snapshot() |
void |
start() |
java.lang.String |
stop_start()
Stops the watch, calculates the elapsed time, restarts the watch, and returns the elapsed time.
|
void |
stop() |
public Stopwatch()
public Stopwatch(boolean start)
public void reset()
public void clear()
public void start()
public void stop()
public long snapshot()
public long elapsedMillis()
public double elapsedSeconds()
public java.lang.String stop_start()
public java.lang.String format()
public java.lang.String format(int digits)