https://bugs.winehq.org/show_bug.cgi?id=49564
qsniyg qsniyg@mail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |qsniyg@mail.com
--- Comment #2 from qsniyg qsniyg@mail.com --- Created attachment 67705 --> https://bugs.winehq.org/attachment.cgi?id=67705 patch to remove epoll_wait timeout
This patch fixes the issue for me. Obviously this is not a correct solution, but it "fixes" the millisecond granularity issue by removing the timeout entirely.
The reason why the issue happens is because the ticks timer is updated every millisecond, but when looking at logs (I've added ERR calls to GetTickCount and Sleep), this will very often (always?) not coincide with the Sleep(1) (or SDL_Delay(1)) call dosbox calls in Normal_Loop (dosbox.cpp).
--- snip --- 835352.591:0024:err:sync:GetTickCount out=835352591 835352.591:0024:err:sync:Sleep sleeping for 1 msec --- snip--- 835352.591:0024:err:sync:Sleep slept 835352.591:0024:err:sync:GetTickCount out=835352591 835352.592:0024:err:sync:GetTickCount out=835352592 --- snip ---
After the hack however, it works properly:
--- snip --- 836157.685:0024:err:sync:GetTickCount out=836157685 836157.685:0024:err:sync:Sleep sleeping for 1 msec --- snip--- 836157.686:0024:err:sync:Sleep slept 836157.686:0024:err:sync:GetTickCount out=836157686 --- snip ---