-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Description
The current xtimer implementation sets a target time as "now + offset - XTIMER_OVERHEAD" instead of "now + offset". This is a different way of timer implementations compared to TinyOS and Contiki. I think the motivation of introducing "XTIMER_OVERHEAD" is for very accurate timer expiry.
But is it necessary to have this? Do we need that accurate timer resolution where a few microseconds matter? On the other hand, this increases a chance of timer setting errors: it is possible to happen "now > now + offset - XTIMER_OVERHEAD" unfortunately (i.e., another redundant cycle for expiry). Note that xtimer is not interrupt-safe now.
I personally set XTIMER_OVERHEAD = 0, which increases robustness of xtimer. Is there any negative effect when removing XTIMER_OVERHEAD? If it is fine, I can open a PR regarding this.