Commit 0e31c0aee65c91e8fe644889cdfb7586518c0c8a

Con Kolivas 2014-03-08T12:46:58

Make per device stats work for average after a stat zeroing.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/cgminer.c b/cgminer.c
index a15818e..296531b 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 == 0)
+	if (cgpu->dev_start_tv.tv_sec < total_tv_start.tv_sec)
 		dev_runtime = total_secs;
 	else {
 		cgtime(&now);