|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.aplu.util.BaseAlarmTimer
ch.aplu.util.HiResAlarmTimer
public class HiResAlarmTimer
Alarm timer with high resolution.
(Resolution normally better than 1 microseconds.)
The timer's precision is not garanteed because of
multitasking/multithreading of operating system and Java.
The timer starts at the given preset time, runs backwards and stops
when it reaches zero.
(When using timer events by registering a TimerListener,
the AlarmTimer restarts automatically.)
(All timer manipulation methods call yield()
of the current thread unless disabled by special constructor.)
| Constructor Summary | |
|---|---|
HiResAlarmTimer(long alarmTime)
Construct a alarm timer instance with better than 1 microsecond resolution on most systems and set its preset time in microseconds (us). |
|
HiResAlarmTimer(long alarmTime,
boolean autostart)
Same as HiResAlarmTimer(alarmTime), but the timer starts immediately if autostart is true. |
|
HiResAlarmTimer(long alarmTime,
boolean autostart,
boolean yield)
Same as HiResAlarmTimer(alarmTime, autostart), but most methods calls Thread.yield() automatically, if yield is true. |
|
| Method Summary |
|---|
| Methods inherited from class ch.aplu.util.BaseAlarmTimer |
|---|
addTimerListener, getTime, isRunning, resume, start, start, stop, stopEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HiResAlarmTimer(long alarmTime)
public HiResAlarmTimer(long alarmTime,
boolean autostart)
public HiResAlarmTimer(long alarmTime,
boolean autostart,
boolean yield)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||