From 49d3e74fdebb619448adde484c31000da4e0b14d Mon Sep 17 00:00:00 2001 From: John Safranek Date: Tue, 17 Sep 2013 22:15:59 -0700 Subject: [PATCH] Fixed a Windows build warning in the benchmark --- ctaocrypt/benchmark/benchmark.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ctaocrypt/benchmark/benchmark.c b/ctaocrypt/benchmark/benchmark.c index 3d4953593..5923191e8 100644 --- a/ctaocrypt/benchmark/benchmark.c +++ b/ctaocrypt/benchmark/benchmark.c @@ -1011,13 +1011,13 @@ void bench_eccKeyAgree(void) double current_time(int reset) { - (void)reset; - static int init = 0; static LARGE_INTEGER freq; LARGE_INTEGER count; + (void)reset; + if (!init) { QueryPerformanceFrequency(&freq); init = 1; @@ -1060,9 +1060,10 @@ void bench_eccKeyAgree(void) double current_time(int reset) { + struct timeval tv; + (void) reset; - struct timeval tv; gettimeofday(&tv, 0); return (double)tv.tv_sec + (double)tv.tv_usec / 1000000;