|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.claritysys.util.Stopwatch
public final class Stopwatch
A useful (well, hopefully) class for timing a set of operations.
It just calls System.currentTimeMillis.
Its probably not really accurate because of all the extra method calls, but it sure is convenient. Its mostly for feedback, not benchmarking.
Constructor Summary | |
---|---|
Stopwatch()
Create a new stopwatch, and mark the time of creation. |
Method Summary | |
---|---|
long |
elapsed()
Return the elapsed time in milliseconds between when the last restart() ocurred and the current system time. |
void |
restart()
Reset the start time to the current system 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 void restart()
public long elapsed()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |