projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
gettime: calibration rounding error
[fio.git]
/
gettime.c
diff --git
a/gettime.c
b/gettime.c
index 89a3a016e4c871a767365f96318392a65ec30ba6..a60b35f65f2b45df5c129a326ffc2c909afa2bdf 100644
(file)
--- a/
gettime.c
+++ b/
gettime.c
@@
-201,13
+201,13
@@
static unsigned long get_cycles_per_usec(void)
gettimeofday(&e, NULL);
elapsed = utime_since(&s, &e);
- if (elapsed >= 10) {
+ if (elapsed >= 1
28
0) {
c_e = get_cpu_clock();
break;
}
} while (1);
- return
c_e - c_s
;
+ return
(c_e - c_s + 127) >> 7
;
}
#define NR_TIME_ITERS 50