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

Function UpdatePauseTime

common/HostSys.cpp:70–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70__noinline static void UpdatePauseTime()
71{
72 u64 wait = GetCPUTicks() + GetTickFrequency() / 100; // Wake up processor (spin for 10ms)
73 while (GetCPUTicks() < wait)
74 ;
75 u32 pause = MeasurePauseTime();
76 // Take a few measurements in case something weird happens during one
77 // (e.g. OS interrupt)
78 for (int i = 0; i < 4; i++)
79 pause = std::min(pause, MeasurePauseTime());
80 PAUSE_TIME = pause;
81 DevCon.WriteLn("MultiPause time: %uns", pause);
82}
83
84u32 ShortSpin()
85{

Callers 1

ShortSpinFunction · 0.85

Calls 5

MeasurePauseTimeFunction · 0.85
GetCPUTicksFunction · 0.50
GetTickFrequencyFunction · 0.50
minFunction · 0.50
WriteLnMethod · 0.45

Tested by

no test coverage detected