Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
/**
* \file FPSLimit.hpp
* \brief FPS Limiter.
*
* This class automatically limits the frames per second of a game loop, and it
* provides performance warnings to stdout if the framerate is less than the
* desired value.
*/
#ifndef __FPSLIMIT_H__
#define __FPSLIMIT_H__
#ifdef __APPLE__
#include "SDL.h"
#else
#include "SDL/SDL.h"
#endif
class FPSLimit {
public:
FPSLimit( int desiredFPS );
void Regulate();
private:
Uint32 lastTime; //!< The SDL timestamp received last call to Regulate.
Uint32 numMillis; //!< The number of milliseconds per frame.
};
#endif