projects
/
libc-test
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e79821
)
bench: fix nextN
author
nsz
<nsz@port70.net>
Thu, 28 Jul 2011 22:36:03 +0000
(
00:36
+0200)
committer
nsz
<nsz@port70.net>
Thu, 28 Jul 2011 22:36:03 +0000
(
00:36
+0200)
common/bench.c
patch
|
blob
|
history
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)