|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rosuda.util.Stopwatch
public class Stopwatch
very simple profile class to measure time differences and do some basic profiling
Constructor Summary | |
---|---|
Stopwatch()
creates a new Stopwatch with current time as start time (i.e. |
|
Stopwatch(boolean beQuiet)
same as Stopwatch() except that the user can enable/disable verbosity of the profiling |
Method Summary | |
---|---|
long |
elapsed()
returns time elapsed since start without stopping the clock |
long |
last()
returns elapsed time between last start and stop (even if new start was issued already) or -1 if not a single complete start/stop sequece exists. |
void |
profile()
print profiling information, i.e. do a restart and print the last elapsed time if not in quiet mode |
void |
profile(java.lang.String s)
print profiling information, i.e. do a restart and print the last elapsed time if not in quiet mode |
long |
restart()
same as issuing stop followed by start except that the time used for both is identical |
long |
start()
sets the start time to current time |
long |
stop()
marks the stop time and returns the elapsed time since start |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Stopwatch()
start()
doesn't have to be called)
public Stopwatch(boolean beQuiet)
Stopwatch()
except that the user can enable/disable verbosity of the profiling
beQuiet
- if set to true profiling function won't print anyhting to consoleMethod Detail |
---|
public long stop()
public long start()
System.currentTimeMillis()
)public long last()
public long elapsed()
public long restart()
public void profile()
public void profile(java.lang.String s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |