|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.util.Timer
com.jme.util.lwjgl.LWJGLTimer
Timer handles the system's time related functionality. This
allows the calculation of the framerate. To keep the framerate calculation
accurate, a call to update each frame is required. Timer is a
singleton object and must be created via the getTimer method.
| Constructor Summary | |
LWJGLTimer()
Constructor builds a Timer object. |
|
| Method Summary | |
float |
getFrameRate()
getFrameRate returns the current frame rate since the last
call to update. |
long |
getResolution()
Returns the resolution of the timer. |
long |
getTime()
Returns the current time in ticks. |
float |
getTimePerFrame()
Returns the time, in seconds, between the last call and the current one. |
java.lang.String |
toString()
toString returns the string representation of this timer
in the format: jme.utility.Timer@1db699b Time: {LONG} FPS: {LONG} |
void |
update()
update recalulates the frame rate based on the previous
call to update. |
| Methods inherited from class com.jme.util.Timer |
getTimeInSeconds, getTimer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public LWJGLTimer()
Timer object. All values will be
initialized to it's default values.
| Method Detail |
public long getTime()
TimergetResolution().
getTime in class TimerTimer.getTime()public long getResolution()
Timer
getResolution in class TimerTimer.getResolution()public float getFrameRate()
getFrameRate returns the current frame rate since the last
call to update.
getFrameRate in class Timerpublic float getTimePerFrame()
Timer
getTimePerFrame in class Timerpublic void update()
update recalulates the frame rate based on the previous
call to update. It is assumed that update is called each frame.
update in class Timerpublic java.lang.String toString()
toString returns the string representation of this timer
in the format:
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||