windows: prevent system sleep while mining

This commit is contained in:
Tanguy Pruvot 2016-08-16 17:59:22 +02:00
parent 1a51a84a94
commit 8f965c2cb2

View File

@ -3761,6 +3761,8 @@ int main(int argc, char *argv[])
}
SetPriorityClass(GetCurrentProcess(), prio);
}
// Prevent windows to sleep while mining
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED);
#endif
if (opt_affinity != -1) {
if (!opt_quiet)