public final class Stopwatch extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
Duration |
elapsed()
Returns the current elapsed time shown on this stopwatch as a
Duration. |
boolean |
isRunning()
|
Stopwatch |
reset()
Sets the elapsed time for this stopwatch to zero, and places it in a stopped state.
|
Stopwatch |
start()
Starts the stopwatch.
|
Stopwatch |
stop()
Stops the stopwatch.
|
public boolean isRunning()
public Stopwatch start()
Stopwatch instanceIllegalStateException - if the stopwatch is already running.public Stopwatch stop()
Stopwatch instanceIllegalStateException - if the stopwatch is already stopped.public Stopwatch reset()
Stopwatch instanceCopyright © 2021. All rights reserved.