Add missing include

This commit is contained in:
Alexander Batalov 2022-05-28 12:48:26 +03:00
parent b1216967c0
commit bf9b865efd
2 changed files with 6 additions and 4 deletions

View File

@ -2,7 +2,7 @@
#include <SDL.h> #include <SDL.h>
FpsLimiter::FpsLimiter(size_t fps) FpsLimiter::FpsLimiter(std::size_t fps)
: _fps(fps) : _fps(fps)
, _ticks(0) , _ticks(0)
{ {

View File

@ -1,15 +1,17 @@
#ifndef FPS_LIMITER_H #ifndef FPS_LIMITER_H
#define FPS_LIMITER_H #define FPS_LIMITER_H
#include <cstddef>
class FpsLimiter { class FpsLimiter {
public: public:
FpsLimiter(size_t fps = 60); FpsLimiter(std::size_t fps = 60);
void mark(); void mark();
void throttle() const; void throttle() const;
private: private:
const size_t _fps; const std::size_t _fps;
size_t _ticks; std::size_t _ticks;
}; };
#endif /* FPS_LIMITER_H */ #endif /* FPS_LIMITER_H */