|
CS101 Package Problem Set Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cs101.util.StopWatch
A stopwatch for timing the execution of code. This class is intended to provide aproximate time of execution to a resolution of single digit miliseconds on most modern machines. Estimates of cost on a dual Athlon MP 2000+ machien yeild the following costs for the following methods
start()
takes aprox 0.000269 seconds
stop()
takes aprox 0.000570 seconds
reset()
takes aprox 0.000274 seconds
elapsed()
takes aprox 0.000278 seconds (stopped)
look()
takes aprox 0.006071 seconds(stopped)
elapsed()
takes aprox 0.000285 seconds (running)
look()
takes aprox 0.006209 seconds (running)
Field Summary | |
static long |
MS_HOUR
|
static long |
MS_MIN
|
static long |
MS_SEC
|
Constructor Summary | |
StopWatch()
Creates a new instance of StopWatch. |
Method Summary | |
long |
elapsed()
|
java.lang.String |
look()
|
void |
reset()
Reset the stopwatch. |
void |
start()
Start the stopwatch. |
void |
stop()
Stop the stopwatch. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static long MS_SEC
public static long MS_MIN
public static long MS_HOUR
Constructor Detail |
public StopWatch()
Method Detail |
public void start()
public void stop()
public void reset()
public long elapsed()
public java.lang.String look()
|
CS101 Package Problem Set Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |