Program Listing for File time_step.hpp¶
↰ Return to documentation for file (inexor/vulkan-renderer/time_step.hpp
)
#pragma once
#include <chrono>
namespace inexor::vulkan_renderer {
class TimeStep {
// The time point of the last render call.
std::chrono::time_point<std::chrono::high_resolution_clock> m_last_time;
// The time point of initialisation.
std::chrono::time_point<std::chrono::high_resolution_clock> m_initialisation_time;
public:
TimeStep();
[[nodiscard]] float time_step();
[[nodiscard]] float time_step_since_initialisation();
};
} // namespace inexor::vulkan_renderer