|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.util.Timer
public abstract class Timer
Timer
is the base class for a high resolution timer. It is
created from getTimer("display system")
Field Summary | |
---|---|
protected static Timer |
instance
|
Constructor Summary | |
---|---|
Timer()
|
Method Summary | |
---|---|
abstract float |
getFrameRate()
Returns the "calls per second". |
abstract long |
getResolution()
Returns the resolution of the timer. |
abstract long |
getTime()
Returns the current time in ticks. |
float |
getTimeInSeconds()
Returns the time in seconds. |
abstract float |
getTimePerFrame()
Returns the time, in seconds, between the last call and the current one. |
static Timer |
getTimer()
Returns the high resolution timer. |
abstract void |
reset()
Reset the timer to 0. |
static void |
setTimer(Timer timer)
Set a user defined timer instance |
abstract void |
update()
update recalculates the frame rate based on the previous
call to update. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Timer instance
Constructor Detail |
---|
public Timer()
Method Detail |
---|
public abstract long getTime()
getResolution()
. The timer starts at 0 ticks.
public float getTimeInSeconds()
public abstract long getResolution()
public abstract float getFrameRate()
public abstract float getTimePerFrame()
public abstract void update()
update
recalculates the frame rate based on the previous
call to update. It is assumed that update is called each frame.
public static Timer getTimer()
public static void setTimer(Timer timer)
timer
- timer to usepublic abstract void reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |