mirror of
https://github.com/86Box/86Box.git
synced 2026-02-24 02:18:20 -07:00
Call timeBeginPeriod only once on startup (#6273)
Use SetProcessInformation to make the OS better handle our threads on big/small cores
This commit is contained in:
@@ -65,11 +65,7 @@ void
|
||||
plat_delay_ms(uint32_t count)
|
||||
{
|
||||
#ifdef Q_OS_WINDOWS
|
||||
// On Win32 the accuracy of Sleep() depends on the timer resolution, which can be set by calling timeBeginPeriod
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/timeapi/nf-timeapi-timebeginperiod
|
||||
timeBeginPeriod(1);
|
||||
Sleep(count);
|
||||
timeEndPeriod(1);
|
||||
#else
|
||||
QThread::msleep(count);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user