export module Core.Clock; import Core.Array; export namespace Core { struct Clock final { size_t index; i64 last; i64 sum; Array time; public: Clock(); // the first invocation will always return 0 nanos i64 update(); float getUpdatesPerSecond() const; static bool sleepNanos(i64 nanos); static bool sleepMillis(i64 millis); static i64 getNanos(); }; }