Browse Source

Fix mutex unlocking with only one thread and opt_log_interval.

Con Kolivas 14 years ago
parent
commit
852e78e7b4
1 changed files with 1 additions and 4 deletions
  1. 1 4
      cpu-miner.c

+ 1 - 4
cpu-miner.c

@@ -542,11 +542,8 @@ static void hashmeter(int thr_id, struct timeval *diff,
 	} else {
 		total_hashes_done += hashes_done;
 		local_hashes_done += hashes_done;
-		if (total_diff.tv_sec < 5) {
-			/* Only update the total every 5 seconds */
-			pthread_mutex_unlock(&hash_lock);
+		if (total_diff.tv_sec < opt_log_interval) 
 			return;
-		}
 		gettimeofday(&total_tv_end, NULL);
 	}
 	timeval_subtract(&total_diff, &total_tv_end, &total_tv_start);