public class StopWatch extends Object implements Closeable
Constructor and Description |
---|
StopWatch() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
isRunning()
The method is used to find out if the StopWatch is started.
|
long |
now() |
long |
now(TimeUnit timeUnit) |
StopWatch |
reset()
Reset elapsed time to zero and make the state of stopwatch stop.
|
StopWatch |
start()
Start to measure times and make the state of stopwatch running.
|
StopWatch |
stop()
Stop elapsed time and make the state of stopwatch stop.
|
String |
toString() |
public boolean isRunning()
public StopWatch start()
public StopWatch stop()
public StopWatch reset()
public long now(TimeUnit timeUnit)
public long now()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2017 Apache Software Foundation. All Rights Reserved.