public class StopWatch extends Object
| Constructor and Description |
|---|
StopWatch()
Instantiates a new StopWatch.
|
StopWatch(Date startTime,
Date endTime)
Instantiates a new StopWatch with the startTime and endTime provided.
|
StopWatch(long startTime,
long endTime)
Instantiates a new StopWatch with the startTime and endTime provided.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getElapsedTime()
Gets the elapsed time.
|
long |
getEndTime()
Gets the end time.
|
long |
getStartTime()
Gets the start time.
|
static void |
main(String[] args)
The main method.
|
void |
reset()
Reset the counter and start counting from scratch.
|
String |
toString() |
public StopWatch(long startTime,
long endTime)
startTime - the start timeendTime - the end timepublic StopWatch(Date startTime, Date endTime)
startTime - the start timeendTime - the end timepublic StopWatch()
public void reset()
public long getStartTime()
public long getEndTime()
public long getElapsedTime()
public static void main(String[] args)
args - the argumentsCopyright © 2016 utils4j. All Rights Reserved.