Skip to content

A timer that can be triggered a finite number of times. #1990

@Voldivh

Description

@Voldivh

Feature request

Feature description

There can be situations in which you would like to call a function a finite number of times within the (same period of time) and not to be called endlessly. For those kind of situations the proposal is to give the timers the option to select the number of times that the timer is triggered. An example of use can be a "One Shot Timer" (which was implemented in ROS 1).

Implementation considerations

Given that use case stated above, it is possible to add the feature by keeping track of the number of times the timer is being triggered and canceling it after the number of callbacks is completed. An example of this implementation can be found on the following fork:

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions