public final class Stopwatch extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private long |
start |
Modifier | Constructor and Description |
---|---|
private |
Stopwatch(long start) |
Modifier and Type | Method and Description |
---|---|
static Stopwatch |
createStarted()
Creates and starts a stopwatch
|
long |
elapsed()
Returns the elapsed milliseconds
|
java.lang.String |
toString()
Formats the duration since start as string
|
private final long start
private Stopwatch(long start)
public static Stopwatch createStarted()
public long elapsed()
public java.lang.String toString()
toString
in class java.lang.Object
Utils.getDurationString(long)