Cysharp/LogicLooper

Doubts about loops?

2505817596 opened this issue · 6 comments

Shouldn't this loop 60 times a second, why is it 30 times?
image

This is due to the timer accuracy of Windows.
We are currently investigating and will fix this in the future.

Racso commented

I'm having the same issue right now. Are there still plans to deploy a fix?

Thanks!

any update for it @mayuki

Approaches to changing the accuracy of Windows timers to avoid this problem have been available for some time.
https://stackoverflow.com/questions/3744032/why-are-net-timers-limited-to-15-ms-resolution

timeBeginPeriod Win32 API can be used to change the timer accuracy on Windows.
https://docs.microsoft.com/ja-jp/windows/win32/api/timeapi/nf-timeapi-timebeginperiod

On Windows 10 version 2004 or later, the timer precision can be changed on a process-by-process basis, so there should be no problem with this method.

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.