|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.wegra.util.stopwatch.Stopwatch
Simple stopwatch class to measure job taken time.
| Constructor Summary | |
Stopwatch()
|
|
| Method Summary | |
static void |
begin(java.lang.Object target)
Sets start time with given key. |
static void |
cancel(java.lang.Object key)
Cancels time measuring. |
static void |
initWatch()
Initializes Stopwatch. |
static long |
stop(java.lang.Object target)
Returns taken time and doesn't continue. |
static long |
stop(java.lang.Object target,
boolean continuable)
Returns taken time. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Stopwatch()
| Method Detail |
public static void begin(java.lang.Object target)
target - The key given by client.
public static long stop(java.lang.Object target)
throws UnknownTargetException
target - Target to watch.
UnknownTargetException - This exception will be thrown when you
call this method before begin watching
the target.
public static long stop(java.lang.Object target,
boolean continuable)
throws UnknownTargetException
target - Target to watch.continuable - true if you want to continue watching.
UnknownTargetException - This exception will be thrown when you
call this method before begin watching
the target.public static void cancel(java.lang.Object key)
key - the key that needs to be canceled.public static void initWatch()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||