|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.lwjgl.util.Timer
public class Timer
A hires timer. This measures time in seconds as floating point values. All Timers created are updated simultaneously by calling the static method tick(). This ensures that within a single iteration of a game loop that all timers are updated consistently with each other.
Constructor Summary | |
---|---|
Timer()
Constructs a timer. |
Method Summary | |
---|---|
float |
getTime()
|
boolean |
isPaused()
|
void |
pause()
Pause the timer. |
void |
reset()
Reset the timer. |
void |
resume()
Resume the timer. |
void |
set(float newTime)
Set the time of this timer |
static void |
tick()
Get the next time update from the system's hires timer. |
java.lang.String |
toString()
Debug output. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Timer()
Method Detail |
---|
public float getTime()
public boolean isPaused()
public void pause()
resume()
public void reset()
set(float)
public void resume()
pause()
public void set(float newTime)
newTime
- the new time, in secondspublic static void tick()
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 |