SetThreadExecutionState function kernel32
Enables an application to inform the system that it is in use, thereby preventing the system from entering sleep or turning off the display while the application is running.
To learn more, see learn.microsoft.com/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate.
Implementation
@pragma('vm:prefer-inline')
EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags) =>
.new(_SetThreadExecutionState(esFlags));