mirror of
https://github.com/GOSTSec/ccminer
synced 2025-01-27 23:14:27 +00:00
windows: high precision timer before threads start
This commit is contained in:
parent
2e0a977784
commit
dfff3b3f98
@ -4034,6 +4034,8 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
// Prevent windows to sleep while mining
|
||||
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED);
|
||||
// Enable windows high precision timer
|
||||
timeBeginPeriod(1);
|
||||
#endif
|
||||
if (opt_affinity != -1) {
|
||||
if (!opt_quiet)
|
||||
@ -4227,10 +4229,6 @@ int main(int argc, char *argv[])
|
||||
opt_n_threads, opt_n_threads > 1 ? "s":"",
|
||||
algo_names[opt_algo]);
|
||||
|
||||
#ifdef WIN32
|
||||
timeBeginPeriod(1); // enable high timer precision (similar to Google Chrome Trick)
|
||||
#endif
|
||||
|
||||
/* main loop - simply wait for workio thread to exit */
|
||||
pthread_join(thr_info[work_thr_id].pth, NULL);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user