com.jme3.system
クラス NanoTimer

java.lang.Object
  上位を拡張 com.jme3.system.Timer
      上位を拡張 com.jme3.system.NanoTimer

public class NanoTimer
extends Timer

NanoTimer is a System.nanoTime implementation of Timer. This is primarily useful for headless applications running on a server.


コンストラクタの概要
NanoTimer()
           
 
メソッドの概要
 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.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

NanoTimer

public NanoTimer()
メソッドの詳細

getTimeInSeconds

public float getTimeInSeconds()
Returns the time in seconds. The timer starts at 0.0 seconds.

オーバーライド:
クラス Timer 内の getTimeInSeconds
戻り値:
the current time in seconds

getTime

public long getTime()
クラス Timer の記述:
Returns the current time in ticks. A tick is an arbitrary measure of time defined by the timer implementation. The number of ticks per second is given by getResolution(). The timer starts at 0 ticks.

定義:
クラス Timer 内の getTime
戻り値:
a long value representing the current time

getResolution

public long getResolution()
クラス Timer の記述:
Returns the resolution of the timer.

定義:
クラス Timer 内の getResolution
戻り値:
the number of timer ticks per second

getFrameRate

public float getFrameRate()
クラス Timer の記述:
Returns the "calls per second". If this is called every frame, then it will return the "frames per second".

定義:
クラス Timer 内の getFrameRate
戻り値:
The "calls per second".

getTimePerFrame

public float getTimePerFrame()
クラス Timer の記述:
Returns the time, in seconds, between the last call and the current one.

定義:
クラス Timer 内の getTimePerFrame
戻り値:
Time between this call and the last one.

update

public void update()
クラス Timer の記述:
update recalculates the frame rate based on the previous call to update. It is assumed that update is called each frame.

定義:
クラス Timer 内の update

reset

public void reset()
クラス Timer の記述:
Reset the timer to 0. Clear any tpf history.

定義:
クラス Timer 内の reset