#pragma once #include #include class DeltaTimer { public: DeltaTimer() noexcept; // Calcula delta en segundos y actualiza el contador interno auto tick() noexcept -> float; // Devuelve el delta estimado desde el Ășltimo tick sin actualizar el contador [[nodiscard]] auto peek() const noexcept -> float; // Reinicia el contador al valor actual o al valor pasado (en performance counter ticks) void reset(Uint64 counter = 0) noexcept; // Escala el tiempo retornado por tick/peek, por defecto 1.0f void setTimeScale(float scale) noexcept; [[nodiscard]] auto getTimeScale() const noexcept -> float; private: Uint64 last_counter_; double perf_freq_; float time_scale_; };