Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

utime.ticks_diff() should handle wrap-arounds #231

@martijnthe

Description

@martijnthe

The original utime.ticks_diff from micropython supports handling wrap-arounds / roll-overs using serial distance: https://docs.micropython.org/en/latest/library/utime.html#utime.ticks_diff

In the Pycom implementation this has been removed (in favor of supporting diffing usec-accuracy timestamps?).

This seem like a bad idea to me because it breaks API compatibility with micropython.
For example, uasyncio relies on utime.ticks_diff. Right now the uasyncio scheduler will start to malfunction after 12.42 days of uptime...

cc @iwahdan88 @robert-hh

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