In cases where timer clock frequency is not an integer number of megahertz, the calculations in timer_us() lack accuracy. This patch modifies calculations to reduce the error. The maximum interval this calculation would support decreases, but it still is in excess of 1844674 seconds for a timer clocked by 10 MHz, which is more than enough. BUG=none TEST=manual . verified timer accuracy using a depthcharge CLI command Change-Id: Iffb323db10e74b0ce3b4d59a56983bfee12e6805 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/207358 Reviewed-by: David Hendricks <dhendrix@chromium.org> |
||
|---|---|---|
| .. | ||
| args.c | ||
| console.c | ||
| ctype.c | ||
| die.c | ||
| exec.c | ||
| getopt_long.c | ||
| hexdump.c | ||
| ipchecksum.c | ||
| lar.c | ||
| lib.c | ||
| Makefile.inc | ||
| malloc.c | ||
| memory.c | ||
| printf.c | ||
| qsort.c | ||
| rand.c | ||
| readline.c | ||
| string.c | ||
| strings.c | ||
| strlcpy.c | ||
| sysinfo.c | ||
| time.c | ||