MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / GSDumpReplayerFrameLimit

Function GSDumpReplayerFrameLimit

pcsx2/GSDumpReplayer.cpp:243–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243static void GSDumpReplayerFrameLimit()
244{
245 if (s_frame_ticks == 0)
246 return;
247
248 // Frame limiter
249 u64 now = GetCPUTicks();
250 const s64 ms = GetTickFrequency() / 1000;
251 const s64 sleep = s_next_frame_time - now - ms;
252 if (sleep > ms)
253 Threading::Sleep(static_cast<s32>(sleep / ms));
254 while ((now = GetCPUTicks()) < s_next_frame_time)
255 ShortSpin();
256 s_next_frame_time = std::max(now, s_next_frame_time + s_frame_ticks);
257}
258
259void GSDumpReplayerCpuStep()
260{

Callers 1

GSDumpReplayerCpuStepFunction · 0.85

Calls 4

ShortSpinFunction · 0.85
GetCPUTicksFunction · 0.50
GetTickFrequencyFunction · 0.50
maxFunction · 0.50

Tested by

no test coverage detected