Commit cf0c8274456a601195cd465601d0ac55fee6b6b0

Con Kolivas 2014-03-08T13:06:50

Correct fix for dev start time being adjusted for stat zeroing.

diff --git a/cgminer.c b/cgminer.c
index 296531b..45fdc2e 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -2324,7 +2324,7 @@ double cgpu_runtime(struct cgpu_info *cgpu)
 	struct timeval now;
 	double dev_runtime;
 
-	if (cgpu->dev_start_tv.tv_sec < total_tv_start.tv_sec)
+	if (cgpu->dev_start_tv.tv_sec == 0)
 		dev_runtime = total_secs;
 	else {
 		cgtime(&now);
@@ -4845,6 +4845,8 @@ void zero_stats(void)
 	for (i = 0; i < total_devices; ++i) {
 		struct cgpu_info *cgpu = get_devices(i);
 
+		memcpy(&cgpu->dev_start_tv, &total_tv_start, sizeof(struct timeval));
+
 		mutex_lock(&hash_lock);
 		cgpu->total_mhashes = 0;
 		cgpu->accepted = 0;