projects
/
libc-test
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
536d65c
)
bench: fix nextN
author
nsz
<nsz@port70.net>
Thu, 28 Jul 2011 22:27:34 +0000
(
00:27
+0200)
committer
nsz
<nsz@port70.net>
Thu, 28 Jul 2011 22:27:34 +0000
(
00:27
+0200)
common/bench.c
patch
|
blob
|
history
diff --git
a/common/bench.c
b/common/bench.c
index
0436f67
..
b179bf8
100644
(file)
--- a/
common/bench.c
+++ b/
common/bench.c
@@
-63,7
+63,11
@@
void reset_timer() {
}
static int nextN() {
- unsigned long long n = 2*SEC/(ns/N + 1);
+ unsigned long long n = ns/N;
+ if (n == 0)
+ n = SEC;
+ else
+ n = SEC/n;
if (n > N*100ULL)
n = N*100ULL;
else if (n <= N)