org.xith3d.loop
Interface GameTimeHost
- All Known Implementing Classes:
- DummyOperationSchedulerImpl, InputAdapterRenderLoop, OperationSchedulerImpl, OperationSchedulerQueue, RenderLoop, UpdatingThread
public interface GameTimeHost
An instance of this interface simply provides access to the
current game-time.
setTimingMode
void setTimingMode(UpdatingThread.TimingMode mode)
- Sets the timing mode for the frameTime.
- Parameters:
mode -
getTimingMode
UpdatingThread.TimingMode getTimingMode()
- Returns:
- the timing mode for the frameTime.
getGameTime
long getGameTime()
- Returns:
- the time, the game is running. This number depends on the current
UpdatingThread.TimingMode. - See Also:
getTimingMode()
getGameNanoTime
long getGameNanoTime()
- Returns:
- the number of nanoseconds the game is running.
getGameMicroTime
long getGameMicroTime()
- Returns:
- the number of microseconds the game is running.
getGameMilliTime
long getGameMilliTime()
- Returns:
- the number of milliseconds the game is running.
getLastFrameTime
long getLastFrameTime()
- Returns:
- the number of time-slices (depending on the
UpdatingThread.TimingMode) the last frame took.
getLastNanoFrameTime
long getLastNanoFrameTime()
- Returns:
- the number of nanoseconds the last frame took.