Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shared/runtime/softtimer: Fix ticks range when computing ticks diff.
The previous computation incorrectly assumed that the uint32_t ticks counter MICROPY_SOFT_TIMER_TICKS_MS was in the range [0,0x80000000) where its actually [0,0xffffffff]. This means the diff calculation can be simplified compared to the original implementation copied from utime_mphal.c, which has to deal with a ticks range constrained by the small int range. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
- Loading branch information
Showing
1 changed file
with
10 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters