|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ch.aplu.util.BaseTimer | +--ch.aplu.util.HiResTimer
Class to define a timer with high resolution (based on J3DTimer). (Resolution normally better than 1 microseconds.) The timer's accuracy is not garanteed because of multitasking/multithreading of operating system and Java. (All methods (except constructors) call yield() of the current thread unless disabled by special constructor.)
Constructor Summary | |
HiResTimer()
Construct a HiResTimer object and set its time to zero. |
|
HiResTimer(boolean autostart)
Same as HiResTimer(), but the timer starts immediately if autostart is true. |
|
HiResTimer(boolean autostart,
boolean yield)
Same as HiResTimer(autostart), but most methods calls Thread.yield() automatically, if yield is true. |
Method Summary | |
static long |
getResolution()
Return the time resolution of the timer ( in nanoseconds ) |
Methods inherited from class ch.aplu.util.BaseTimer |
getTime, isRunning, reset, resume, start, stop |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HiResTimer()
public HiResTimer(boolean autostart)
public HiResTimer(boolean autostart, boolean yield)
Method Detail |
public static long getResolution()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |