mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-02 10:04:33 +00:00
Update the hashmeter once per second but only display the extra logs every opt_log_inteval.
This commit is contained in:
parent
e9a9a51547
commit
5a2c2a7a85
@ -4686,10 +4686,11 @@ static void hashmeter(int thr_id, struct timeval *diff,
|
|||||||
|
|
||||||
total_mhashes_done += local_mhashes;
|
total_mhashes_done += local_mhashes;
|
||||||
local_mhashes_done += local_mhashes;
|
local_mhashes_done += local_mhashes;
|
||||||
if (total_diff.tv_sec < opt_log_interval)
|
/* Only update the total every second */
|
||||||
/* Only update the total every opt_log_interval seconds */
|
if (!total_diff.tv_sec)
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
showlog = true;
|
if (total_diff.tv_sec >= opt_log_interval)
|
||||||
|
showlog = true;
|
||||||
gettimeofday(&total_tv_end, NULL);
|
gettimeofday(&total_tv_end, NULL);
|
||||||
|
|
||||||
local_secs = (double)total_diff.tv_sec + ((double)total_diff.tv_usec / 1000000.0);
|
local_secs = (double)total_diff.tv_sec + ((double)total_diff.tv_usec / 1000000.0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user