@ThreadSafe public final class ManualTimingSource extends TimingSource
tick()
method. This is not a general use timing source and
should be used with care. It is intended for testing purposes as well as
active rendering.
Callers of the tick()
must ensure that a consistent thread context
is maintained, i.e., always call this method from the same thread.
The init()
and dispose()
methods do nothing in this
implementation and do not need to be invoked. However, isDisposed()
will reflect if dispose()
has been invoked.
TimingSource.PostTickListener, TimingSource.TickListener
Constructor and Description |
---|
ManualTimingSource() |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Stops the timing source and disposes of its resources.
|
void |
init()
Starts up the timing source.
|
boolean |
isDisposed()
Gets if this timing target has had
TimingSource.dispose() invoked on it. |
void |
tick()
Called to "tick" time along.
|
java.lang.String |
toString() |
addPostTickListener, addTickListener, removePostTickListener, removeTickListener, runPerTick, submit
public void init()
TimingSource
init
in class TimingSource
public void tick()
Callers must ensure that a consistent thread context is maintained, i.e., always call this method from the same thread.
public void dispose()
TimingSource
dispose
in class TimingSource
public boolean isDisposed()
TimingSource
TimingSource.dispose()
invoked on it.isDisposed
in class TimingSource
true
if this timing target has had TimingSource.dispose()
invoked on it, false
otherwise.public java.lang.String toString()
toString
in class java.lang.Object