public final class Stopwatch
extends java.lang.Object
Constructor and Description |
---|
Stopwatch() |
Modifier and Type | Method and Description |
---|---|
long |
getElapsedTime()
Gets ellapsed time in milliseconds
|
boolean |
isRunning()
Gets the value indicating whether this instance is measuring time
|
void |
reset()
Resets measured results
|
void |
start()
Starts time measure
|
static Stopwatch |
startNew()
Creates and starts new
Stopwatch instance |
void |
stop()
Stops time measure
|
public static Stopwatch startNew()
Stopwatch
instanceStopwatch
instancepublic void start()
public void stop()
public void reset()
public long getElapsedTime()
public boolean isRunning()
Stopwatch
instance measures time