|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.erights.e.extern.timer.TimerWatcher | +--org.erights.e.extern.timer.Clock
Untamed:
Field Summary | |
private boolean |
amTicking
Current run state |
private Object |
myLock
|
private long |
myResolution
Tick resolution in milliseconds |
private TickReactor |
myTarget
Target EObject |
private TimerThread |
myThread
The timer thread that is our source of tick events |
private int |
myTicks
Current tick number |
private Vat |
myVat
|
Constructor Summary | |
(package private) |
Clock(TimerThread thread,
long resolution,
TickReactor target)
Called by the Timer.every() method. |
Method Summary | |
int |
getTicks()
Enabled: Gets the current tick |
(package private) void |
handleTimeout()
Called by the timer thread at clock tick time. |
void |
start()
Enabled: Starts the Clock from the current tick. |
void |
stop()
Enabled: Stops the clock from ticking. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final Object myLock
private final TimerThread myThread
private final Vat myVat
private final TickReactor myTarget
private boolean amTicking
private final long myResolution
private int myTicks
Constructor Detail |
Clock(TimerThread thread, long resolution, TickReactor target)
Captures the current Vat, so must be called from within the vat-thread holding target.
thread
- The timer thread we are running withresolution
- How often we are to get tick eventsMethod Detail |
public int getTicks()
void handleTimeout()
handleTimeout
in class TimerWatcher
public void start()
public void stop()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |