1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-22 04:24:19 +00:00

Initialise gpu_ms_average.

This commit is contained in:
Con Kolivas 2011-07-14 11:47:56 +10:00
parent ba4ba7f65c
commit 3d900e7bc2

2
main.c
View File

@ -1545,6 +1545,7 @@ static void *gpuminer_thread(void *userdata)
struct thr_info *mythr = userdata; struct thr_info *mythr = userdata;
const int thr_id = mythr->id; const int thr_id = mythr->id;
uint32_t *res, *blank_res; uint32_t *res, *blank_res;
double gpu_ms_average = 7;
size_t globalThreads[1]; size_t globalThreads[1];
size_t localThreads[1]; size_t localThreads[1];
@ -1584,7 +1585,6 @@ static void *gpuminer_thread(void *userdata)
while (1) { while (1) {
struct timeval tv_workstart, tv_gpustart, tv_gpuend; struct timeval tv_workstart, tv_gpustart, tv_gpuend;
suseconds_t gpu_us; suseconds_t gpu_us;
double gpu_ms_average;
gettimeofday(&tv_gpustart, NULL); gettimeofday(&tv_gpustart, NULL);
timeval_subtract(&diff, &tv_gpustart, &tv_gpuend); timeval_subtract(&diff, &tv_gpustart, &tv_gpuend);