Skip to content

Is there a way to test time.ticks_diff() ? #16897

Discussion options

You must be logged in to vote

On a XIAO nRF52840 Sense with NRF52840 I get the same result of 2000 with the first code snippet and MicroPython 1.24.0. 2**30 is by 1 out of the range of a 30 Bit number, which will then give you unexpected results.
With 2**30 - 1 instead I get a result of 268470025 with your second test script, which is reasonable.
Try updating the firmware. to v1.24.1.
Edit: It may be that the v1.22.2 version you use has a smaller ticks_xxx() range.

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@MrTinkerman
Comment options

@robert-hh
Comment options

Answer selected by MrTinkerman
@MrTinkerman
Comment options

@robert-hh
Comment options

Comment options

You must be logged in to vote
3 replies
@robert-hh
Comment options

@mendenm
Comment options

@scruss
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants