|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wings.util.TimeMeasure
public class TimeMeasure
Some simple stop watch. It allows to measure multiple time periods and prints them. Usage: call start(comment) and stop() for each period of time.
| Field Summary | |
|---|---|
protected org.wings.util.TimeMeasure.Measure |
current
the current time measurement. |
protected MessageFormat |
formatter
Message formatter |
protected ArrayList |
measures
List of measurements. |
protected static double |
RESOLUTION
|
| Constructor Summary | |
|---|---|
TimeMeasure()
Simple TimeMesaure with default format. |
|
TimeMeasure(MessageFormat formatter)
A new TimeMeasure which reports in a specific format. |
|
| Method Summary | |
|---|---|
String |
print()
|
String |
print(boolean shortestIsReference)
creates a formatted output (using the MessageFormat) of all results. |
void |
reset()
Reset of all Measurements. |
void |
start(String comment)
|
void |
stop()
stop current time measurement and store it. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final double RESOLUTION
protected final ArrayList measures
protected final MessageFormat formatter
protected org.wings.util.TimeMeasure.Measure current
| Constructor Detail |
|---|
public TimeMeasure()
public TimeMeasure(MessageFormat formatter)
{0} the measurement comment{1} the time it took{2} how many times this is faster than the
slowest measurement
| Method Detail |
|---|
public void reset()
public void start(String comment)
public void stop()
public String print()
public String print(boolean shortestIsReference)
shortestIsReference - boolean true, if the shortest time interval
is the reference value (1.0). False, if the
longest is the reference.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||