sdljavax.gfx
Class FPSmanager

java.lang.Object
  extended by sdljavax.gfx.FPSmanager

public final class FPSmanager
extends java.lang.Object

Full java version of the framerate manager from SDL_gfx library.

Version:
$Id: FPSmanager.java,v 1.1 2005/02/18 02:54:32 doc_alton Exp $
Author:
Bart LEBOEUF

Field Summary
static int FPS_DEFAULT
           
static int FPS_LOWER_LIMIT
           
static int FPS_UPPER_LIMIT
           
(package private)  int framecount
           
(package private)  long lastticks
           
(package private)  int rate
           
(package private)  float rateticks
           
 
Constructor Summary
FPSmanager()
          framerate manager
 
Method Summary
 void framerateDelay()
          Delay execution to maintain a constant framerate.
 int getFramerate()
          Return the current target framerate in Hz
 void initFramerate()
          Initialize the framerate manager
 int setFramerate(int new_rate)
          Set the framerate in Hz
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FPS_UPPER_LIMIT

public static final int FPS_UPPER_LIMIT
See Also:
Constant Field Values

FPS_LOWER_LIMIT

public static final int FPS_LOWER_LIMIT
See Also:
Constant Field Values

FPS_DEFAULT

public static final int FPS_DEFAULT
See Also:
Constant Field Values

framecount

int framecount

rateticks

float rateticks

lastticks

long lastticks

rate

int rate
Constructor Detail

FPSmanager

public FPSmanager()
framerate manager

Method Detail

initFramerate

public void initFramerate()
Initialize the framerate manager


framerateDelay

public void framerateDelay()
Delay execution to maintain a constant framerate. Calculate fps.


setFramerate

public int setFramerate(int new_rate)
Set the framerate in Hz


getFramerate

public int getFramerate()
Return the current target framerate in Hz

Returns: