fallout2-ce/src/fps_limiter.h

20 lines
295 B
C
Raw Normal View History

2022-05-23 01:13:28 -07:00
#ifndef FPS_LIMITER_H
#define FPS_LIMITER_H
2022-09-23 05:43:44 -07:00
namespace fallout {
2022-05-23 01:13:28 -07:00
class FpsLimiter {
public:
2022-12-26 01:03:14 -08:00
FpsLimiter(unsigned int fps = 60);
2022-05-23 01:13:28 -07:00
void mark();
void throttle() const;
private:
2022-12-26 01:03:14 -08:00
const unsigned int _fps;
unsigned int _ticks;
2022-05-23 01:13:28 -07:00
};
2022-09-23 05:43:44 -07:00
} // namespace fallout
2022-05-23 01:13:28 -07:00
#endif /* FPS_LIMITER_H */