Having seen that it didn't want to sleep for more than 10ms, I added the following code at the front of myth's WaitForFrame():
if (m_delay > 8000) {
int sleepTime = m_delay - 6000;
usleep(sleepTime);
}
i.e. delay until there are 2ms until the time myth thinks the frame should be displayed. This leads to logs that look like this:
WaitForFrame at : 17808 sleeptime : 11808
WaitForFrame II at : 5870 Delay at sync: -9631
WaitForFrame at : 24409 sleeptime : 18409
WaitForFrame II at : 5865 Delay at sync: -2885
WaitForFrame at : 31029 sleeptime : 25029
WaitForFrame II at : 5871 Delay at sync: 3662
Wait 1 intervals. Count 93245119 Delay -13069
WaitForFrame at : 21271 sleeptime : 15271
WaitForFrame II at : 5849 Delay at sync: -6322
Having seen that it didn't want to sleep for more than 10ms, I added the following code at the front of myth's WaitForFrame():
if (m_delay > 8000) { sleepTime) ;
int sleepTime = m_delay - 6000;
usleep(
}
i.e. delay until there are 2ms until the time myth thinks the frame should be displayed. This leads to logs that look like this:
WaitForFrame at : 17808 sleeptime : 11808
WaitForFrame II at : 5870 Delay at sync: -9631
WaitForFrame at : 24409 sleeptime : 18409
WaitForFrame II at : 5865 Delay at sync: -2885
WaitForFrame at : 31029 sleeptime : 25029
WaitForFrame II at : 5871 Delay at sync: 3662
Wait 1 intervals. Count 93245119 Delay -13069
WaitForFrame at : 21271 sleeptime : 15271
WaitForFrame II at : 5849 Delay at sync: -6322
And the problem wasn't fixed.