public class Stopwatch
extends java.lang.Object
Constructor and Description |
---|
Stopwatch()
Creates a new Stopwatch, calls start() automatically.
|
Modifier and Type | Method and Description |
---|---|
long |
elapsed()
Returns the amount of time since the last call to start() (or this Stopwatch's creation) in milliseconds.
|
long |
elapsed(java.util.concurrent.TimeUnit units)
Returns the amount of time since the last call to start() (or this Stopwatch's creation) in the units specified.
|
void |
start()
Starts the stopwatch.
|
public Stopwatch()
public void start()
public long elapsed()
public long elapsed(java.util.concurrent.TimeUnit units)