From 179670f32f4960f00a89c7ef08382b06dd024873 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Tue, 20 Feb 2018 15:26:59 -0800 Subject: use TIMELOOP_NANOSEC, as suggested by @terrelln --- programs/bench.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/bench.c b/programs/bench.c index 14b6dd1..002eac9 100644 --- a/programs/bench.c +++ b/programs/bench.c @@ -263,7 +263,7 @@ static int BMK_benchMem(const void* srcBuffer, size_t srcSize, if (clockSpan < fastestC * nbCompressionLoops) fastestC = clockSpan / nbCompressionLoops; assert(fastestC > 0); - nbCompressionLoops = (U32)(1000000000/*1sec*/ / fastestC) + 1; /* aim for ~1sec */ + nbCompressionLoops = (U32)(TIMELOOP_NANOSEC / fastestC) + 1; /* aim for ~1sec */ } else { assert(nbCompressionLoops < 40000000); /* avoid overflow */ nbCompressionLoops *= 100; @@ -307,7 +307,7 @@ static int BMK_benchMem(const void* srcBuffer, size_t srcSize, if (clockSpan < fastestD * nbDecodeLoops) fastestD = clockSpan / nbDecodeLoops; assert(fastestD > 0); - nbDecodeLoops = (U32)(1000000000/*1sec*/ / fastestD) + 1; /* aim for ~1sec */ + nbDecodeLoops = (U32)(TIMELOOP_NANOSEC / fastestD) + 1; /* aim for ~1sec */ } else { assert(nbDecodeLoops < 40000000); /* avoid overflow */ nbDecodeLoops *= 100; -- cgit v0.12