|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--at.gv.egovernment.moa.util.MOATimer
A timer utility for named timers.
| Constructor Summary | |
protected |
MOATimer()
Create a new MOATimer.
|
| Method Summary | |
void |
clearTiming(String id)
Remove a timing. |
long |
duration(Object id)
Get the duration of an action. |
String |
durationAsString(Object id)
Get the duration of an action, as a nicely formatted String. |
static MOATimer |
getInstance()
Return the single instance of this class. |
void |
startTiming(Object id)
Start timing a certain action. |
void |
stopTiming(Object id)
Stop timing an action. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected MOATimer()
MOATimer.
Protected to disallow multiple instances.| Method Detail |
public static MOATimer getInstance()
public void startTiming(Object id)
id - The action ID.public void stopTiming(Object id)
id - The action ID.public long duration(Object id)
id - The action ID for which to compute the duration.startTiming() and stopTiming(). If
only startTiming() has been called for the action, then
current difference to the system time is returned. If no timing exists for
the action, - 1 is returned.public String durationAsString(Object id)
String.id - The action ID.duration() as a String.public void clearTiming(String id)
id - The action ID.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||