fallout2-ce/src/fps_limiter.h

18 lines
267 B
C
Raw Normal View History

2022-05-23 01:13:28 -07:00
#ifndef FPS_LIMITER_H
#define FPS_LIMITER_H
2022-05-28 02:48:26 -07:00
#include <cstddef>
2022-05-23 01:13:28 -07:00
class FpsLimiter {
public:
2022-05-28 02:48:26 -07:00
FpsLimiter(std::size_t fps = 60);
2022-05-23 01:13:28 -07:00
void mark();
void throttle() const;
private:
2022-05-28 02:48:26 -07:00
const std::size_t _fps;
std::size_t _ticks;
2022-05-23 01:13:28 -07:00
};
#endif /* FPS_LIMITER_H */