public class Timer
extends java.lang.Object
Constructor and Description |
---|
Timer()
Creates a new timer.
|
Timer(java.lang.String name)
Creates a new timer with the given name.
|
Modifier and Type | Method and Description |
---|---|
void |
end()
Stops the current timer.
|
long |
getTime()
Returns the sum of the intervals start()-end() of the current timer.
|
void |
start()
Starts the given timer.
|
java.lang.String |
toString()
Returns the name of the current timer.
|
public Timer(java.lang.String name)
public Timer()
public void start()
public java.lang.String toString()
toString
in class java.lang.Object
public void end()
public long getTime()