From 0b833131616efc0eb1788f2b46114885d6a3d56b Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 16 Feb 2013 09:07:33 +1100 Subject: [PATCH] Fix tv_lastupdate being made into tv_end and update the hashmeter on cycle, not opt_log_interval. --- cgminer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cgminer.c b/cgminer.c index f30f6be0..51faefea 100644 --- a/cgminer.c +++ b/cgminer.c @@ -5492,10 +5492,10 @@ void *miner_thread(void *userdata) max_nonce = max_nonce * 0x400 / (((cycle * 1000000) + sdiff.tv_usec) / (cycle * 1000000 / 0x400)); timersub(&tv_end, &tv_lastupdate, &diff); - if (diff.tv_sec >= opt_log_interval) { + if (diff.tv_sec >= cycle) { hashmeter(thr_id, &diff, hashes_done); hashes_done = 0; - tv_lastupdate = tv_end; + memcpy(&tv_lastupdate, &tv_end, sizeof(struct timeval)); } if (unlikely(mythr->work_restart)) {