Browse Source

Update the hashmeter at most 5 times per second.

nfactor-troky
Con Kolivas 12 years ago
parent
commit
072ffbba42
  1. 3
      cgminer.c

3
cgminer.c

@ -5709,7 +5709,8 @@ static void hash_sole_work(struct thr_info *mythr) @@ -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…
Cancel
Save