Skip to content

setTargetTime confusing behaviour #4

@Risele

Description

@Risele

Whenever using setTargetTime() function, timer behavior becomes irrelevant in case interval scheduled is less than time specified. Expected behavior is interval is recalculated or ignored.

I found two ways to fix this:

  1. The timer interval must be specified definetly longer than expected in application, for example (uint32_t)(-1)
  2. The start() function must be called before setTargetTime(). This case target time calculation happens in startFrom() is overrided.

P.S.: Found this issue when applied a MillisTimer as a scheduler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions