Skip to content
Commit a6809ef9 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Anas Nashif
Browse files

timer: hpet: a few improvements



- That MIN_DELAY is a magic arbitrary number that is never going to be
  right for all cases. Get rid of it in favor of a smarter solution.

- `sys_clock_set_timeout()` should not base its next match value on the
  current time. Tracking the `last_tick` and `last_elapsed` values avoids
  the need for all the tick rounding computation.

- Clamp the next timeout to HPET_MAX_TICKS/2. This leaves room for the
  added elapsed time and any possible IRQ servicing delay.

Signed-off-by: default avatarNicolas Pitre <npitre@baylibre.com>
parent 9c69f29d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment