Sha256: cfc622f091001fb0fa94c24584a622bc831a4bb072412171829ec28eae0ee4b3
Contents?: true
Size: 495 Bytes
Versions: 28
Compression:
Stored size: 495 Bytes
Contents
#include <Gosu/Inspection.hpp> #include <Gosu/Timing.hpp> namespace Gosu { namespace FPS { int fps, accum; unsigned long sec; void registerFrame() { ++accum; unsigned long newSec = Gosu::milliseconds() / 1000; if (sec != newSec) { sec = newSec; fps = accum; accum = 0; } } } int fps() { return FPS::fps; } }
Version data entries
28 entries across 28 versions & 1 rubygems