Commit cf6b5e99271a6c60bd624b11065f6258018ce918

Con Kolivas 2014-03-28T23:45:24

We should not update the tv hashmeter time unless we're updating the hashrates

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/cgminer.c b/cgminer.c
index 902b0bf..fa2ffc1 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -5827,7 +5827,6 @@ static void hashmeter(int thr_id, uint64_t hashes_done)
 
 	cgtime(&total_tv_end);
 	tv_tdiff = tdiff(&total_tv_end, &tv_hashmeter);
-	copy_time(&tv_hashmeter, &total_tv_end);
 	now_t = total_tv_end.tv_sec;
 	diff_t = now_t - hashdisplay_t;
 	if (diff_t >= opt_log_interval) {
@@ -5840,6 +5839,7 @@ static void hashmeter(int thr_id, uint64_t hashes_done)
 		 * we only update if it has been more than opt_log_interval */
 		return;
 	}
+	copy_time(&tv_hashmeter, &total_tv_end);
 
 	if (thr_id >= 0) {
 		struct thr_info *thr = get_thread(thr_id);