Skip to content

xtimer: Is XTIMER_OVERHEAD necessary? #9491

@Hyungsin

Description

@Hyungsin

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.

@gebart @kaspar030

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: timersArea: timer subsystemsState: staleState: The issue / PR has no activity for >185 daysType: questionThe issue poses a question regarding usage of RIOT

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions