Commit c7eb9f3761ec110a8d5e3c062d657f4111293841

ckolivas 2012-06-26T14:05:54

Microsecond multiplier error.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/driver-opencl.c b/driver-opencl.c
index 7ba0e26..90606fa 100644
--- a/driver-opencl.c
+++ b/driver-opencl.c
@@ -1363,7 +1363,7 @@ static uint64_t opencl_scanhash(struct thr_info *thr, struct work *work,
 		suseconds_t gpu_us;
 
 		timersub(&gpu->tv_gpuend, &gpu->tv_gpustart, &diff);
-		gpu_us = diff.tv_sec * 1000 + diff.tv_usec;
+		gpu_us = diff.tv_sec * 1000000 + diff.tv_usec;
 		if (likely(gpu_us > 0)) {
 			gpu->gpu_us_average = (gpu->gpu_us_average + gpu_us * 0.63) / 1.63;