public class SystemClock extends ContinuousClock
| Modifier and Type | Field and Description |
|---|---|
protected long |
stoptime
The time when the clock was stopped (used to adjust timers before restarting the clock).
|
dilation, elapsed, executor, laststart, threadpoolcurrenttime, DEFAULT_DELTA, delta, listeners, name, starttime, state, ticktimer, ticktimers, timersEVENT_TYPE_NEW_DELTA, EVENT_TYPE_NEW_DILATION, EVENT_TYPE_NEXT_TIMEPOINT, EVENT_TYPE_RESET, EVENT_TYPE_STARTED, EVENT_TYPE_STOPPED, EVENT_TYPE_TIMER_ADDED, EVENT_TYPE_TIMER_REMOVED, STATE_RUNNING, STATE_SUSPENDED, TYPE_CONTINUOUS, TYPE_EVENT_DRIVEN, TYPE_SYSTEM, TYPE_TIME_DRIVEN| Constructor and Description |
|---|
SystemClock(jadex.bridge.service.types.clock.IClock oldclock,
jadex.commons.concurrent.IThreadPool threadpool)
Create a new clock.
|
SystemClock(java.lang.String name,
long delta,
jadex.commons.concurrent.IThreadPool threadpool)
Create a new clock.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
copyFromClock(jadex.bridge.service.types.clock.IClock oldclock)
Transfer state from another clock to this clock.
|
double |
getDilation()
The dilation is always 1.0.
|
long |
getTime()
The current time is always the same as the system time.
|
java.lang.String |
getType()
Get the type of the clock.
|
void |
stop()
Stop the clock.
|
addChangeListener, addTimer, computeNextTimepoint, createExecutor, dispose, removeTimer, reset, setDilation, startactivateTickTimer, addTickTimer, createTickTimer, createTimer, getDelta, getName, getNextTimer, getStarttime, getState, getTick, getTickTimers, getTimers, hasListeners, notifyListeners, removeChangeListener, removeTickTimer, setDelta, setStarttime, shutdownprotected long stoptime
public SystemClock(jadex.bridge.service.types.clock.IClock oldclock,
jadex.commons.concurrent.IThreadPool threadpool)
oldclock - The old clock.public SystemClock(java.lang.String name,
long delta,
jadex.commons.concurrent.IThreadPool threadpool)
protected void copyFromClock(jadex.bridge.service.types.clock.IClock oldclock)
copyFromClock in class ContinuousClockpublic java.lang.String getType()
getType in interface jadex.bridge.service.types.clock.IClockgetType in class ContinuousClockpublic long getTime()
getTime in interface jadex.bridge.service.types.clock.IClockgetTime in class ContinuousClockpublic double getDilation()
getDilation in interface IContinuousClockgetDilation in class ContinuousClockpublic void stop()
stop in interface jadex.bridge.service.types.clock.IClockstop in class ContinuousClock