|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.folt.util.Timer
public class Timer
This class implements a timer for measuring the time need for operations. A timer can be started, stopped an continued.
Timer timer = new Timer(); timer.start(); timer.stop(); timer.continue(); ...
| Constructor Summary | |
|---|---|
Timer()
creates a times |
|
| Method Summary | |
|---|---|
void |
continueTimer()
continueTimer continues a stopped timer |
void |
endTimer()
endTimer sets the end time of timer at the current time. |
long |
getContinueTime()
|
long |
getDeductTime()
|
long |
getEndTime()
|
long |
getStartTime()
|
long |
getStopTime()
|
void |
setContinueTime(long continueTime)
|
void |
setDeductTime(long deductTime)
|
void |
setEndTime(long endTime)
|
void |
setStartTime(long startTime)
|
void |
setStopTime(long stopTime)
|
void |
startTimer()
startTimer starts a timers |
void |
stopTimer()
stopTimer stops a timer |
long |
timeNeeded()
timeNeeded |
java.lang.String |
timerString(java.lang.String string)
timerString returns a formatted timer string: Format produced: str = "Time needed for " + string + " " + timeneeded + " ms (" + seconds + " sec/" + minutes + " min)"; |
java.lang.String |
timerString(java.lang.String string,
long iCount)
timerString returns a formatted timer string. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Timer()
| Method Detail |
|---|
public void continueTimer()
public void endTimer()
public long getContinueTime()
public long getDeductTime()
public long getEndTime()
public long getStartTime()
public long getStopTime()
public void setContinueTime(long continueTime)
continueTime - The continueTime to set.public void setDeductTime(long deductTime)
deductTime - The deductTime to set.public void setEndTime(long endTime)
endTime - The endTime to set.public void setStartTime(long startTime)
startTime - The startTime to set.public void setStopTime(long stopTime)
stopTime - The stopTime to set.public void startTimer()
public void stopTimer()
public long timeNeeded()
public java.lang.String timerString(java.lang.String string)
str = "Time needed for " + string + " " + timeneeded + " ms (" + seconds + " sec/" + minutes + " min)";
string - description string to add
public java.lang.String timerString(java.lang.String string,
long iCount)
str = "Time needed for " + string + " " + timeneeded + " ms (" + seconds + " sec/" + minutes + " min) for " + iCount + " operations. Average was " + average + " ms. ";
string - the description string to addiCount - the number of operations for which the mean operation time should be computed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||