|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.aavalla.utils.general.Timer
public final class Timer
This class can be used to time operations.
Constructor Summary | |
---|---|
Timer()
Default constructor |
Method Summary | |
---|---|
long |
getExecutionTime()
Returns the time in nanoseconds spent after this timer has started, not counting the time it's been paused. |
double |
getExecutionTimeInSeconds()
Returns the time in nanoseconds spent after this timer has started, not counting the time it's been paused. |
long |
getPausedTime()
Returns the time this timer has spent in paused state. |
double |
getPausedTimeInSeconds()
Returns the time this timer has spent in paused state. |
boolean |
isPaused()
Returns true, if the timer is currently paused. |
boolean |
isStarted()
Returns true, if the timer is running (even if it is paused). |
void |
pause()
Pauses the timer. |
void |
start()
Resets all aspects of the timer and (re)starts it. |
void |
stop()
Stops the timer. |
void |
unPause()
Unpauses the timer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Timer()
Method Detail |
---|
public final void start()
public final void stop()
public final void pause()
public final void unPause()
public final long getExecutionTime()
public final double getExecutionTimeInSeconds()
public final long getPausedTime()
public final double getPausedTimeInSeconds()
public final boolean isStarted()
public final boolean isPaused()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |