Skip to content

ZTimer: Input types for sleep{,_extended} functions #112

@chrysn

Description

@chrysn

Right now (since #66 cleaned up a prior way more inconsistent state), sleep takes Ticks and sleep_extended takes a Duration.

Generally, either could take different kinds of times, eg. fugit types (as previously suggested in https://gitlab.com/etonomy/riot-wrappers/-/issues/6), possibly constructed from helper functions (sleep_seconds(5), sleep_milliseconds(500)). I think the expectation should be that anything accepted by sleep is convertible at build time, whereas sleep_extended may incur relatively costly transformations that may cause multiple sleeps on overflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions