#ifndef CLOCK_H #define CLOCK_H #include "utils/Types.h" #include "utils/Array.h" class Clock final { public: Clock(); u64 update(); u64 getLength() const; float getUpdatesPerSecond() const; private: static constexpr u64 bits = 7; static constexpr u64 length = 1 << bits; u64 last; u64 index; s64 sum; Array time; }; #endif