|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjimm.evote.StopWatch
Prints time durations; used for development purposes and foolin' around.
No threads or system resources are harmed in the making of a stop watch. A stop watch simply remembers the start time (and elapsed time when paused) and prints the total running time (wall clock time) when stopped.
Field Summary | |
protected long |
elapsedTime
|
protected java.lang.String |
name
|
protected long |
t0
|
Constructor Summary | |
StopWatch()
Constructor. |
|
StopWatch(java.lang.String name)
Constructor. |
Method Summary | |
void |
mark()
Prints the current elapsed time without stopping. |
void |
mark(boolean printMark)
Prints the current elapsed time without stopping, along with the stop watch name if printMark is true . |
void |
pause()
Pauses the stop watch. |
void |
resume()
Resumes the stop watch. |
void |
start()
Remembers the current time. |
void |
start(boolean printStarting)
Remembers the current time and prints a message if requested. |
void |
stop()
Stops the stop watch and prints the current elapsed time. |
void |
stop(boolean printName)
Stops the stop watch and prints the current elapsed time, along with the stop watch name if printMark is true . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String name
protected long t0
protected long elapsedTime
Constructor Detail |
public StopWatch()
public StopWatch(java.lang.String name)
name
- identifying textMethod Detail |
public void start()
public void start(boolean printStarting)
printStarting
- if true
and this stop watch has a
name, print a messagepublic void pause()
public void resume()
public void mark()
public void mark(boolean printMark)
true
.
printMark
- if true
, the stop watch name will
be printedpublic void stop()
public void stop(boolean printName)
true
.
printName
- if true
, the stop watch name will
be printed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |