|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkrati.util.Chronos
public class Chronos
Chronos
Constructor Summary | |
---|---|
Chronos()
Constructor : initialize the tick and sets no stream |
|
Chronos(PrintStream out)
Constructor : initialize the tick and set the stream to the one given |
Method Summary | |
---|---|
void |
displayElapsedTime()
Display the time elapsed since the last call (with no message) |
void |
displayElapsedTime(String msg)
Display the time elapsed since the last call (with an additional message) |
void |
flush()
Flushes the underlying writer |
String |
getElapsedTime()
Returns a string that represents the time elapsed since the last call |
long |
getTotalTime()
|
void |
restart()
Restarts this Chronos. |
long |
tick()
Returns the number of milliseconds elapsed since the last call to this function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Chronos()
public Chronos(PrintStream out)
out
- the print stream for the outputMethod Detail |
---|
public void restart()
public long tick()
public long getTotalTime()
public String getElapsedTime()
public void displayElapsedTime()
public void displayElapsedTime(String msg)
msg
- the message to display firstpublic void flush()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |