|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.ctdp.rfdynhud.valuemanagers.Clock
public abstract class Clock
A Clock
sets the c()
member to true in implementation specific intervals
Field Summary | |
---|---|
static long |
ONE_SECOND_NANOS
|
Constructor Summary | |
---|---|
protected |
Clock()
|
Method Summary | |
---|---|
boolean |
c()
Gets the current clock flag. |
boolean |
c(int step)
Gets a 'multiplied' clock flag. |
boolean |
c2()
This is a shortcut for c(int) with a step value of 2. |
boolean |
c3()
This is a shortcut for c(int) with a step value of 3. |
long |
getTicks()
Gets the number of true situations since the last call to init(long) . |
void |
init(long nanoTime)
Initializes/resets the ManagedValue . |
protected abstract void |
initImpl(long nanoTime)
Implementation specific code for initialization. |
void |
update(long nanoTime,
long frameCounter,
boolean force)
Invokes the implementation specific update code. |
protected abstract boolean |
updateImpl(long nanoTime,
long frameCounter,
boolean force)
Implementation of the update method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long ONE_SECOND_NANOS
Constructor Detail |
---|
protected Clock()
Method Detail |
---|
protected abstract void initImpl(long nanoTime)
nanoTime
- the starting time stamppublic final void init(long nanoTime)
ManagedValue
.
init
in interface ManagedValue
nanoTime
- the starting time stamppublic final boolean c()
true
, if the flag is set, false
otherwise.public final boolean c(int step)
step
- the number of clock ticks to wait for the next 'true'
true
, if the current flag is set, and ( ticks % step ) is 0.public final boolean c2()
c(int)
with a step value of 2.
true
every 2 clock ticks, false
otherwise.public final boolean c3()
c(int)
with a step value of 3.
true
every 3 clock ticks, false
otherwise.public final long getTicks()
true
situations since the last call to init(long)
.
init(long)
.protected abstract boolean updateImpl(long nanoTime, long frameCounter, boolean force)
nanoTime
- the current timestamp in nano secondsframeCounter
- the current frame indexforce
- force clock to true
.
true
to set the Clock
flag to true
.public final void update(long nanoTime, long frameCounter, boolean force)
update
in interface ManagedValue
nanoTime
- the current timestamp in nano secondsframeCounter
- the current frame indexforce
- force clock to true
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |