Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (24 sloc) 0.463 kb
#include <Gosu/Inspection.hpp>
#include <Gosu/Timing.hpp>
namespace Gosu
{
namespace FPS
{
int fps, accum, sec;
void registerFrame()
{
++accum;
int newSec = Gosu::milliseconds() / 1000;
if (sec != newSec)
{
sec = newSec;
fps = accum;
accum = 0;
}
}
}
int fps()
{
return FPS::fps;
}
}
Jump to Line
Something went wrong with that request. Please try again.