public class StopWatch
extends java.lang.Object
Constructor and Description |
---|
StopWatch()
Basic constructor for getting an instance of a StopWatch.
|
Modifier and Type | Method and Description |
---|---|
void |
lap()
Saves a lap time if the watch is running.
|
void |
print()
Prints out the lap times and the total time.
|
void |
printLap()
Prints out the lap time of the last recorded lap.
|
void |
start()
Starts the stop watch, saves the start time and clears old times.
|
void |
stop()
Stops the watch and saves the end time.
|
public StopWatch()
public void start()
public void stop()
public void lap()
public void print()
public void printLap()