sp00n / corecycler

Script to test single core stability, e.g. for PBO & Curve Optimizer on AMD Ryzen or overclocking/undervolting on Intel processors
Other
663 stars 30 forks source link

Prevent Sleep while running #18

Closed sp00n closed 3 years ago

sp00n commented 3 years ago

Apparently Windows can go to Sleep/Standby/Hibernation even if the script is running. But apparently there is also a way to prevent this: https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate https://gist.github.com/brianhassel/e918c7b9f1a6265ff8f9 https://decatec.de/programmierung/c-sharp-windows-standby-unterdruecken/