|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.aplu.util.BaseAlarmTimer
public abstract class BaseAlarmTimer
Abstract base class for HiResAlarmTimer and LoResAlarmTimer. See HiResAlarmTimer or LoResAlarmTimer for more details.
Method Summary | |
---|---|
void |
addTimerListener(TimerListener timerListener)
Register a TimerListener to fire callbacks when the time interval expires (current time reaches 0 or the timer is stopped). |
long |
getTime()
Return the current time in microseconds (us). |
boolean |
isRunning()
Return true if the timer is running (current time > 0 and not stopped). |
void |
resume()
Restart the timer from its current time. |
void |
start()
Set the timer to the preset alarm time and start it. |
void |
start(long alarmTime)
Set the timer to the given preset alarm time and start it. |
void |
stop()
Stop the timer and store the current time. |
void |
stopEvents()
Force to stop the callback calls by terminating the timer's polling thread. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public long getTime()
public void start()
public void start(long alarmTime)
public void stop()
public void resume()
public boolean isRunning()
public void addTimerListener(TimerListener timerListener)
public void stopEvents()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |