public class SystemClock extends ContinuousClock
DEFAULT_DELTA, timers
EVENT_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(IClock oldclock,
IThreadPool threadpool)
Create a new clock.
|
SystemClock(String name,
long delta,
IThreadPool threadpool)
Create a new clock.
|
Modifier and Type | Method and Description |
---|---|
double |
getDilation()
The dilation is always 1.0.
|
long |
getTime()
The current time is always the same as the system time.
|
String |
getType()
Get the type of the clock.
|
void |
stop()
Stop the clock.
|
addChangeListener, addTimer, dispose, removeTimer, reset, setDilation, start
addTickTimer, createTickTimer, createTimer, getDelta, getName, getNextTimer, getStarttime, getState, getTick, getTickTimers, getTimers, removeChangeListener, removeTickTimer, setDelta, shutdown
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addTickTimer, createTickTimer, createTimer, getDelta, getName, getNextTimer, getStarttime, getState, getTick, getTickTimers, getTimers, removeChangeListener, removeTickTimer, setDelta
public SystemClock(IClock oldclock, IThreadPool threadpool)
oldclock
- The old clock.public SystemClock(String name, long delta, IThreadPool threadpool)
public String getType()
getType
in interface IClock
getType
in class ContinuousClock
public long getTime()
getTime
in interface IClock
getTime
in class ContinuousClock
public double getDilation()
getDilation
in interface IContinuousClock
getDilation
in class ContinuousClock
public void stop()
stop
in interface IClock
stop
in class ContinuousClock
Copyright © 2012. All Rights Reserved.