projects
/
libc-test
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
bench: fix nextN
[libc-test]
/
common
/
bench.c
diff --git
a/common/bench.c
b/common/bench.c
index
b179bf8
..
2e1ace5
100644
(file)
--- 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)