Executing before logic nextTick because of overflow #7
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When the nextTick calculated will overflow the 16-bit unsigned int, it will start from 0.
If the timer has not yet overflown in the next check, then the check will return true before the logic distance in ticks was reached yet.
Solution:
timer
andnextTick
is more than (half?) of the timer-overflowif(timer >= nextTick && (timer - nextTick) < (2^timerBits /2))
Implemented