|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openptk.util.Timer
public class Timer
Singleton class which will hold timers that can be used by any calling class to time start/stop timers and report on timings
Method Summary | |
---|---|
static void |
main(java.lang.String[] argv)
|
static long |
startTimer(java.lang.String timerName)
StartTimer will capture the time this method is called and store it in a timer named by the passed argument timerName. |
static long |
stopTimer(java.lang.String timerName)
StopTimer will capture the time this method is called and return the elapsed time in ms since the corresponding StartTimer was called for that timerName. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void main(java.lang.String[] argv)
public static long startTimer(java.lang.String timerName)
Multiple successive startTimer methods can be called. Each timer is pushed onto a stack that will be popped off only after a stopTimer method is called.
Note: This is a static factory method that will create the one and only singleton instance if it hasn't been created yet.
timerName
- String of name of timer
public static long stopTimer(java.lang.String timerName)
Note: This is a static factory method that will create the one and only singleton instance if it hasn't been created yet.
timerName
- String of name of timer
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |