MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ calculate_elapsed_frames()

uint64_t MayaFlux::Vruta::FrameClock::calculate_elapsed_frames ( std::chrono::steady_clock::time_point  now) const
private

Calculate frames elapsed based on wall-clock time.

Parameters
nowCurrent time point
Returns
Number of frames that should have elapsed

Definition at line 165 of file Clock.cpp.

166{
167 auto time_since_last_tick = now - m_last_tick_time;
168 return static_cast<uint64_t>(time_since_last_tick / m_frame_duration);
169}
std::chrono::steady_clock::time_point m_last_tick_time
Definition Clock.hpp:283
std::chrono::nanoseconds m_frame_duration
Definition Clock.hpp:276

References m_frame_duration, and m_last_tick_time.

Referenced by tick().

+ Here is the caller graph for this function: