mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-30 08:24:26 +00:00
Fix mutex unlocking with only one thread and opt_log_interval.
This commit is contained in:
parent
70f7357692
commit
852e78e7b4
@ -542,11 +542,8 @@ static void hashmeter(int thr_id, struct timeval *diff,
|
|||||||
} else {
|
} else {
|
||||||
total_hashes_done += hashes_done;
|
total_hashes_done += hashes_done;
|
||||||
local_hashes_done += hashes_done;
|
local_hashes_done += hashes_done;
|
||||||
if (total_diff.tv_sec < 5) {
|
if (total_diff.tv_sec < opt_log_interval)
|
||||||
/* Only update the total every 5 seconds */
|
|
||||||
pthread_mutex_unlock(&hash_lock);
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
gettimeofday(&total_tv_end, NULL);
|
gettimeofday(&total_tv_end, NULL);
|
||||||
}
|
}
|
||||||
timeval_subtract(&total_diff, &total_tv_end, &total_tv_start);
|
timeval_subtract(&total_diff, &total_tv_end, &total_tv_start);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user