| 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 | |
| 84 | u32 ShortSpin() |
| 85 | { |
no test coverage detected