|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.time.TimeEvent
public class TimeEvent
The heartbeat of the application that indicates what the current display time is, for all other components to react to. It might reflect the current system time, or the time that should be reflected in some recording playback.
Field Summary | |
---|---|
static TimeEvent |
NO_TIME
|
protected long |
offsetTime
The current offset time, in millis from the start of the time frame of interest. |
protected long |
simTime
The current simulation time, if the current system time does not correspond to the time frame of the data. |
protected java.lang.Object |
source
The source of the TimeEvent. |
protected long |
systemTime
The current system time, millis from unix epoch. |
protected TimerStatus |
timerStatus
Description of how/why time changed. |
Constructor Summary | |
---|---|
TimeEvent(java.lang.Object src,
long systemTime,
long offsetTime,
long simTime,
TimerStatus timerStatus)
Create a time event. |
Method Summary | |
---|---|
static TimeEvent |
create(java.lang.Object src,
long time,
long systemTime,
long simTime,
TimerStatus timerStatus)
Create a time event, with the option of receiving the NO_TIME event if the time is Long.MIN_VALUE and the system time and simulation time are Long.MAX_VALUE. |
long |
getOffsetTime()
|
long |
getSimTime()
|
java.lang.Object |
getSource()
|
long |
getSystemTime()
|
TimerStatus |
getTimerStatus()
Returns the String identifying the timer action (TIMER_FORWARD, TIMER_STOPPED, TIMER_TIME_STATUS, ...). |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.Object source
protected long systemTime
protected long offsetTime
protected long simTime
protected TimerStatus timerStatus
public static final TimeEvent NO_TIME
Constructor Detail |
---|
public TimeEvent(java.lang.Object src, long systemTime, long offsetTime, long simTime, TimerStatus timerStatus)
src
- the object creating the time event.systemTime
- the current system time, millis from the epoch.offsetTime
- the current offset time, in millis from the start of
the mission or media.simTime
- the current simulation time, in millis from the start of
the simulation clock.timerStatus
- Method Detail |
---|
public static TimeEvent create(java.lang.Object src, long time, long systemTime, long simTime, TimerStatus timerStatus)
src
- the object creating the time event.time
- the current time of the clock, millis from the epoch.systemTime
- the time of the start of the media, in millis from
epoch. Subtracted from the time, it should give the offset time
from the start of the mission or media.simTime
- the starting time within the simulation of the currently
active mission or media, in millis. When the offset time (time -
system time) is added to this time, you should have the current
game time.timerStatus
- to describe what kind of TimeEvent should be
created.
public java.lang.Object getSource()
public long getSystemTime()
public long getOffsetTime()
public long getSimTime()
public TimerStatus getTimerStatus()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |