com.planeth.common.timing
Class FrameCounter

java.lang.Object
  extended bycom.planeth.common.timing.FrameCounter

public class FrameCounter
extends java.lang.Object

Counts the frames/second

Author:
Andreas Grässer, gal@planet-h.com.
created May 7, 2005

Constructor Summary
FrameCounter()
          Constructor for FrameCounter.
FrameCounter(int countInterval)
          Constructor for FrameCounter.
 
Method Summary
 void count()
          Counts the frames per second
 int getFramesPerSecond()
          Returns the frames per second
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrameCounter

public FrameCounter()
Constructor for FrameCounter.


FrameCounter

public FrameCounter(int countInterval)
Constructor for FrameCounter.

Parameters:
countInterval - defines the interval to be used for the frame counter (smaller = less acourate)
Method Detail

count

public void count()
Counts the frames per second


getFramesPerSecond

public int getFramesPerSecond()
Returns the frames per second

Returns:
Returns the frames per second