#pragma once #include "Common/Sizes.hpp" namespace MC { class Time { public: using Timestamp = U64; Time() = default; void start_frame(); void end_frame(); U64 total_frames() const; Real delta() const; static Timestamp now(); private: static constexpr Real delta_max = 1.0 / 10.0; static constexpr Real delta_min = 1.0 / 1000.0; U64 m_total_frames = 0; Timestamp m_current_frame_start = 0; Real m_delta = 0; }; }