mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-10 23:08:07 +00:00
Update the hashmeter at most 5 times per second.
This commit is contained in:
parent
bfb85c45d7
commit
072ffbba42
@ -5709,7 +5709,8 @@ static void hash_sole_work(struct thr_info *mythr)
|
||||
max_nonce = max_nonce * 0x400 / (((cycle * 1000000) + sdiff.tv_usec) / (cycle * 1000000 / 0x400));
|
||||
|
||||
timersub(&tv_end, &tv_lastupdate, &diff);
|
||||
if (diff.tv_sec >= cycle) {
|
||||
/* Update the hashmeter at most 5 times per second */
|
||||
if (diff.tv_sec > 0 || diff.tv_usec > 200) {
|
||||
hashmeter(thr_id, &diff, hashes_done);
|
||||
hashes_done = 0;
|
||||
memcpy(&tv_lastupdate, &tv_end, sizeof(struct timeval));
|
||||
|
Loading…
Reference in New Issue
Block a user