|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjme.utility.Timer
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.
| Method Summary | |
float |
getFrameRate()
getFrameRate returns the current frame rate since the
last call to update. |
float |
getMaxFrameRate()
getMinFrameRate returns the highest frame rate recorded. |
float |
getMinFrameRate()
getMinFrameRate returns the lowest frame rate recorded. |
static Timer |
getTimer()
getTimer returns the singleton instance of the
Timer class. |
void |
setProcessPriority(int priority)
setProcessPriority sets the priority of this application. |
void |
setTime(long time)
setTime sets the time of the timer. |
java.lang.String |
toString()
toString returns the string representation of this timer
in the format:jme.utility.Timer@1db699b Time: {LONG} FPS: {FLOAT} |
void |
update()
update recalulates the frame rate based on the previous
call to update. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
public float getFrameRate()
getFrameRate returns the current frame rate since the
last call to update.
public float getMinFrameRate()
getMinFrameRate returns the lowest frame rate recorded.
public float getMaxFrameRate()
getMinFrameRate returns the highest frame rate recorded.
public void setProcessPriority(int priority)
setProcessPriority sets the priority of this application.
priority - the application's priority level.public void setTime(long time)
setTime sets the time of the timer.
time - the new time of the timer.public void update()
update recalulates the frame rate based on the previous
call to update. It is assumed that update is called each frame.
public static Timer getTimer()
getTimer returns the singleton instance of the
Timer class.
public 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 | ||||||||||