public class Timer
extends java.lang.Object
text
parameter. Time is measured in milliseconds.Constructor and Description |
---|
Timer()
Creates a new timer collection.
|
Modifier and Type | Method and Description |
---|---|
long |
getTime(java.lang.String text)
Gets the time of the specified timer.
|
void |
printTime(java.lang.String text)
Prints the time of the specified timer.
|
void |
start(java.lang.String text)
Starts the specified timer.
|
void |
stop(java.lang.String text)
Stops the specified timer.
|
public void start(java.lang.String text)
text
- identification of timer to startpublic void stop(java.lang.String text)
text
- identification of timer to stoppublic long getTime(java.lang.String text)
text
- identification of timer to get time ofpublic void printTime(java.lang.String text)
text
- identification of timer to print