Skip to content

After 2147483647 milliseconds (~ 25 days) all timers will expire immediately #4

@0xCAFEDECAF

Description

@0xCAFEDECAF

https://github.com/aron-bordin/PNG-Arduino-Framework/blob/6f6809e97a4831675feb3f99b39b281648a64d4f/Timer/Timer.cpp#L87

So... after 0x7FFFFFFF (2147483647) milliseconds (~ 25 days), all timers will expire immediately??

From that moment until millis() actually rolls over (at ~ 49 days), LastTime will be set to 0 so that the expression in the next line is always 'true'.

BTW, lines 87/88 are unnecessary because the arithmetic in line 89 has safe roll-over behaviour.

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