GF4J 0.9.4 Beta

gameframe.engines.msjava4x
Class CTimer

java.lang.Object
  |
  +--gameframe.engines.msjava4x.CTimer
All Implemented Interfaces:
Finalizable, Timer

class CTimer
extends java.lang.Object
implements Timer, Finalizable

Microsoft Java VM specific implementation of the timer. Uses the win32 multimedia timer function (winmm.dll function call timeGetTime()) to calculate the time. Resolution of this timer is 1 ms under Win95/98 and 5 ms under WinNT.

Since:
GameFrame for Java 0.9
Version:
GameFrame for Java 0.9.4

Field Summary
private  EngineFactory m_engineFactory
          The engine factory that created this timer.
private  int m_lastTime
          The time from last invocation of calculateTime() method.
 
Constructor Summary
(package private) CTimer(EngineFactory engineFactory)
          Constructs a Microsoft Java VM specific timer.
 
Method Summary
 float calculateTime()
          When invoked calculates the time that has expired since the last invokation in milliseconds.
 void finalize()
          Releases all resources used by the timer object.
 
Methods inherited from class java.lang.Object
, clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

m_lastTime

private int m_lastTime
The time from last invocation of calculateTime() method.

m_engineFactory

private EngineFactory m_engineFactory
The engine factory that created this timer.
Constructor Detail

CTimer

CTimer(EngineFactory engineFactory)
Constructs a Microsoft Java VM specific timer.
Method Detail

calculateTime

public float calculateTime()
When invoked calculates the time that has expired since the last invokation in milliseconds.
Specified by:
calculateTime in interface Timer
Returns:
The time that has gone since last invokation.

finalize

public void finalize()
Releases all resources used by the timer object.
Specified by:
finalize in interface Timer
Overrides:
finalize in class java.lang.Object

GF4J 0.9.4 Beta