Browse Source

windows: prevent system sleep while mining

2upstream
Tanguy Pruvot 8 years ago
parent
commit
8f965c2cb2
  1. 2
      ccminer.cpp

2
ccminer.cpp

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

Loading…
Cancel
Save