123456789101112131415161718192021222324 |
- #ifndef CLOCK_H
- #define CLOCK_H
- #include <GLFW/glfw3.h>
- class Clock
- {
- public:
- Clock();
- Clock(const Clock& orig);
- virtual ~Clock();
-
- 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
|