Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
fps_clock.h
Go to the documentation of this file.
1#ifndef FPS_CLOCK_H
2#define FPS_CLOCK_H
3
4#include <SFML/System.hpp>
5
9{
10public:
11 fps_clock();
12
14 double get_fps() const noexcept { return m_fps; }
15
17 void tick() noexcept;
18
19private:
20
21 sf::Clock m_clock;
22
23 double m_fps;
24};
25
27void test_fps_clock();
28
29#endif // FPS_CLOCK_H
Clock to count the frames per second.
Definition fps_clock.h:9
double get_fps() const noexcept
Get the frames per seconds.
Definition fps_clock.h:14
fps_clock()
Definition fps_clock.cpp:5
void tick() noexcept
Indicate a frame has processed.
Definition fps_clock.cpp:25
void test_fps_clock()
Test this class and its free functions.
Definition fps_clock.cpp:11