|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbe.hogent.tarsos.util.StopWatch
public final class StopWatch
StopWatch counts the ticks (ns) passed between initialization and invocation of ticksPassed.
| Constructor Summary | |
|---|---|
StopWatch()
Create and start the stop watch. |
|
| Method Summary | |
|---|---|
java.lang.String |
formattedToString()
|
long |
nanoTicksPassed()
|
void |
start()
Starts or restarts the watch. |
long |
ticksPassed()
|
double |
timePassed(TimeUnit unit)
Calculates and returns the time passed in the requested unit. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StopWatch()
| Method Detail |
|---|
public long ticksPassed()
ticksPassed. In milliseconds or 10^-3 seconds.public long nanoTicksPassed()
ticksPassed. In nanoseconds or 10^-9 seconds.public double timePassed(TimeUnit unit)
unit - The requested time unit.
public void start()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String formattedToString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||