Browse Source

Update the hashmeter at most 5 times per second.

Conflicts:
	miner.c
Con Kolivas 13 years ago
parent
commit
ba54b7451b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      miner.c

+ 2 - 1
miner.c

@@ -5834,7 +5834,8 @@ void hashmeter2(struct thr_info *thr)
 	
 	gettimeofday(&tv_now, NULL);
 	timersub(&tv_now, &thr->tv_lastupdate, &tv_elapsed);
-	if (tv_elapsed.tv_sec >= opt_log_interval) {
+	/* Update the hashmeter at most 5 times per second */
+	if (tv_elapsed.tv_sec > 0 || tv_elapsed.tv_usec > 200) {
 		hashmeter(thr->id, &tv_elapsed, thr->hashes_done);
 		thr->hashes_done = 0;
 		thr->tv_lastupdate = tv_now;