diff --git a/common/bench.c b/common/bench.c index b179bf8..2e1ace5 100644 --- a/common/bench.c +++ b/common/bench.c @@ -64,10 +64,12 @@ void reset_timer() { static int nextN() { unsigned long long n = ns/N; - if (n == 0) - n = SEC; - else + + if (n) n = SEC/n; + else + n = SEC; + n += n/4; if (n > N*100ULL) n = N*100ULL; else if (n <= N)