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 Fps * | GetInstance (void) |
Gets an object for this class. |
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.
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.