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.
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:
- Check if the difference between <code>timer</code> and <code>nextTick</code> is more than (half?) of the timer-overflow
<br><br>
<code>if(timer >= nextTick && (timer - nextTick) < (2^timerBits /2))</code>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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:
timerandnextTickis more than (half?) of the timer-overflowif(timer >= nextTick && (timer - nextTick) < (2^timerBits /2))Implemented