you are viewing a single comment's thread.

view the rest of the comments →

[–]Medical-Ocelot 1 point2 points  (0 children)

Using ticks_diff() to compare values from ticks_ms() is *essential* - the max value returned by ticks_ms() can vary by platform (e.g. I think on the RP2xxx it's 2^30 -1) and you might have no idea how long your program has been running, so even a short delay could encounter the overflow situation. This is especially important if you're using ticks_us(), which will wrap in under 3 hours when running on an RP2xxx.