Vincent Torri wrote:
On Wed, Apr 28, 2021 at 9:35 PM Christian Franke
<...> wrote:
BTW.1: Hack:
Do this once in the program
    #ifdef _WIN32
      timeBeginPeriod(1);
https://docs.microsoft.com/fr-fr/windows/win32/api/timeapi/nf-timeapi-timebeginperiod?redirectedfrom=MSDN

"Setting a higher resolution can improve the accuracy of time-out
intervals in wait functions. However, it can also reduce overall
system performance, because the thread scheduler switches tasks more
often. High resolutions can also prevent the CPU power management
system from entering power-saving modes. "


The name "Multimedia" (IIRC a marketing term from last millennium) suggests that this API is very old. I'm sure that there was a significant effect with the 60-300Mhz single core CPUs from these days.

A quick test with a 10 year old i7-2600K (4C/8T), Win10, idle desktop, OpenHardwareMonitor: During [timeBeginPeriod(1)...timeEndPeriod(1)], CPU Package Power (~7.5W) increased by ~1W, VCore (~0.75V) increased by ~0.10V and Core Clocks (1600MHz) did not change.

--
Best regards,
Christian Franke



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to