public interface IClock
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EVENT_TYPE_NEW_DELTA
Change event type new delta.
|
static java.lang.String |
EVENT_TYPE_NEW_DILATION
Change event type new dilation.
|
static java.lang.String |
EVENT_TYPE_NEXT_TIMEPOINT
Change event next timepoint.
|
static java.lang.String |
EVENT_TYPE_RESET
Change event type reset.
|
static java.lang.String |
EVENT_TYPE_STARTED
Change event type started.
|
static java.lang.String |
EVENT_TYPE_STOPPED
Change event type stopped.
|
static java.lang.String |
EVENT_TYPE_TIMER_ADDED
Change event timer added.
|
static java.lang.String |
EVENT_TYPE_TIMER_REMOVED
Change event timer removed.
|
static java.lang.String |
STATE_RUNNING
The clock state running.
|
static java.lang.String |
STATE_SUSPENDED
The clock state suspended.
|
static java.lang.String |
TYPE_CONTINUOUS
The clock type continuous.
|
static java.lang.String |
TYPE_EVENT_DRIVEN
The clock type event driven.
|
static java.lang.String |
TYPE_SYSTEM
The clock type system.
|
static java.lang.String |
TYPE_TIME_DRIVEN
The clock type time driven.
|
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(IChangeListener listener)
Add a change listener.
|
void |
addTickTimer(ITimer timer)
Add a tick timer.
|
void |
addTimer(ITimer timer)
Add a timer.
|
ITimer |
createTickTimer(ITimedObject to)
Create a new tick timer.
|
ITimer |
createTimer(long time,
ITimedObject to)
Create a new timer.
|
void |
dispose()
Called, when the clock is no longer used.
|
long |
getDelta()
Get the clock delta.
|
java.lang.String |
getName()
Get the clocks name.
|
ITimer |
getNextTimer()
Get the next timer.
|
long |
getStarttime()
Get the clocks start time.
|
java.lang.String |
getState()
Get the clock state.
|
double |
getTick()
Get the current tick.
|
ITimer[] |
getTickTimers()
Get all active tick timers.
|
long |
getTime()
Get the current time.
|
ITimer[] |
getTimers()
Get all active timers.
|
java.lang.String |
getType()
Get the clock type.
|
void |
removeChangeListener(IChangeListener listener)
Remove a change listener.
|
void |
removeTickTimer(ITimer timer)
Remove a tick timer.
|
void |
removeTimer(ITimer timer)
Remove a timer.
|
void |
reset()
Reset the clock.
|
void |
setDelta(long delta)
Set the clock delta.
|
void |
setStarttime(long starttime)
Set the clocks start time.
|
void |
start()
Start the clock.
|
void |
stop()
Stop the clock.
|
static final java.lang.String STATE_RUNNING
static final java.lang.String STATE_SUSPENDED
static final java.lang.String TYPE_SYSTEM
static final java.lang.String TYPE_CONTINUOUS
static final java.lang.String TYPE_EVENT_DRIVEN
static final java.lang.String TYPE_TIME_DRIVEN
static final java.lang.String EVENT_TYPE_NEW_DELTA
static final java.lang.String EVENT_TYPE_NEW_DILATION
static final java.lang.String EVENT_TYPE_STARTED
static final java.lang.String EVENT_TYPE_STOPPED
static final java.lang.String EVENT_TYPE_RESET
static final java.lang.String EVENT_TYPE_TIMER_ADDED
static final java.lang.String EVENT_TYPE_TIMER_REMOVED
static final java.lang.String EVENT_TYPE_NEXT_TIMEPOINT
long getTime()
double getTick()
long getStarttime()
void setStarttime(long starttime)
starttime
- The start time.long getDelta()
java.lang.String getName()
java.lang.String getType()
java.lang.String getState()
void setDelta(long delta)
ITimer[] getTimers()
ITimer[] getTickTimers()
void start()
void stop()
void reset()
ITimer createTimer(long time, ITimedObject to)
System.currentTimeMillis()
.timespan
- The relative timespan after which the timed object should be notified.to
- The timed object.ITimer createTickTimer(ITimedObject to)
to
- The timed object.ITimer getNextTimer()
void addChangeListener(IChangeListener listener)
listener
- The change listener.void removeChangeListener(IChangeListener listener)
listener
- The change listener.void dispose()
void addTimer(ITimer timer)
timer
- The timer.void removeTimer(ITimer timer)
timer
- The timer.void addTickTimer(ITimer timer)
timer
- The timer.void removeTickTimer(ITimer timer)
timer
- The timer.