![]() |
Mali OpenGL ES SDK
2.0.0
A simple framework to aid development of OpenGL ES applications targeting ARM Mali platforms.
|
Provides a platform independent high resolution timer. More...
#include <Timer.h>
Public Member Functions | |
Timer () | |
Default Constructor. | |
void | reset () |
Resets the timer to 0.0f. | |
float | getTime () |
Returns the time passed since object creation or since reset() was last called. | |
float | getInterval () |
Returns the time passed since getInterval() was last called. | |
float | getFPS () |
Returns the FPS (Frames Per Second). | |
bool | isTimePassed (float seconds=1.0f) |
Tests if 'seconds' seconds have passed since reset() or this method was called. |
Private Attributes | |
int | frameCount |
float | fps |
float | lastTime |
timeval | startTime |
timeval | currentTime |
float | lastIntervalTime |
float | fpsTime |
Provides a platform independent high resolution timer.
float MaliSDK::Timer::getFPS | ( | ) |
Returns the FPS (Frames Per Second).
This function must be called once per frame.
float MaliSDK::Timer::getInterval | ( | ) |
Returns the time passed since getInterval() was last called.
If getInterval() has not been called before, it retrieves the time passed since object creation or since reset() was called.
float MaliSDK::Timer::getTime | ( | ) |
Returns the time passed since object creation or since reset() was last called.
bool MaliSDK::Timer::isTimePassed | ( | float | seconds = 1.0f | ) |
Tests if 'seconds' seconds have passed since reset() or this method was called.
[in] | seconds | number of seconds passed default is 1.0 |