12345678910111213141516171819202122232425 |
- #ifndef CLOCK_H
- #define CLOCK_H
- #include <GLFW/glfw3.h>
- class Clock
- {
- public:
- Clock();
- Clock(const Clock& orig);
- virtual ~Clock();
-
- uint64_t getCurrentTime() const;
- void update();
- double getUpdatesPerSecond() const;
- private:
- static const int SIZE = 64;
- uint64_t oldTime = 0;
- uint64_t time[SIZE];
- uint64_t sum = 0;
- unsigned int index = 0;
- };
- #endif
|