|
||||||||||
| 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.NanoTimer
public class NanoTimer
NanoTimer is a System.nanoTime implementation of Timer.
This is primarily useful for headless applications running on a server.
| Field Summary |
|---|
| Fields inherited from class com.jme.util.Timer |
|---|
instance |
| Constructor Summary | |
|---|---|
NanoTimer()
|
|
| Method Summary | |
|---|---|
float |
getFrameRate()
Returns the "calls per second". |
long |
getResolution()
Returns the resolution of the timer. |
long |
getTime()
Returns the current time in ticks. |
float |
getTimeInSeconds()
Returns the time in seconds. |
float |
getTimePerFrame()
Returns the time, in seconds, between the last call and the current one. |
void |
reset()
Reset the timer to 0. |
void |
update()
update recalculates the frame rate based on the previous
call to update. |
| Methods inherited from class com.jme.util.Timer |
|---|
getTimer, setTimer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NanoTimer()
| Method Detail |
|---|
public float getTimeInSeconds()
getTimeInSeconds in class Timerpublic long getTime()
TimergetResolution(). The timer starts at 0 ticks.
getTime in class Timerpublic long getResolution()
Timer
getResolution in class Timerpublic float getFrameRate()
Timer
getFrameRate in class Timerpublic float getTimePerFrame()
Timer
getTimePerFrame in class Timerpublic void update()
Timerupdate recalculates the frame rate based on the previous
call to update. It is assumed that update is called each frame.
update in class Timerpublic void reset()
Timer
reset in class Timer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||