Commit 553d53fcee8f8551e88d20da177263380355054e

Con Kolivas 2012-02-23T17:58:06

Reset all hash counters at the same time as resetting start times to get accurate hashrates on exiting which is mandatory for benchmarking.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/cgminer.c b/cgminer.c
index ac1af07..786eb6d 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -4611,6 +4611,13 @@ int main (int argc, char *argv[])
 		start_longpoll();
 
 begin_bench:
+	total_mhashes_done = 0;
+	for (i = 0; i < total_devices; i++) {
+		struct cgpu_info *cgpu = devices[i];
+
+		cgpu->rolling = cgpu->total_mhashes = 0;
+	}
+	
 	gettimeofday(&total_tv_start, NULL);
 	gettimeofday(&total_tv_end, NULL);
 	get_datestamp(datestamp, &total_tv_start);