e2d::core::Fps Class Reference

List of all members.

Detailed Description

You can use this class to calculate the framerate of your game.

This class is a Singleton, what means you can't create an instance of Fps yourself. It is available to you via Utilities.

Public Member Functions

int GetCount (void)
 Counts the frames within a second.
float GetEstimative (void)
 Estimates the framerate per frame.

Static Public Member Functions

static FpsGetInstance (void)
 Gets an object for this class.

Member Function Documentation

Fps * e2d::core::Fps::GetInstance ( void   )  [static]

This class is a Singleton. If you want an instance of this class to work with, get it via this method.

int e2d::core::Fps::GetCount ( void   ) 

Keeps counting frames until a second elapses. Its return value just changes after at least a second has elapsed. Call this method every frame to get a valid result.

number of frames counted in the last second.

float e2d::core::Fps::GetEstimative ( void   ) 

Calculates the estimated number of frames per second based on the duration of the last frame. Call this method every frame to get a valid estimative.

estimated framerate

Generated on Tue Dec 8 10:32:44 2009 for Easy2D by  doxygen 1.5.6