@sam - did you have a chance to try adding protection to ticksRemain overflow? been thinking more about whether there is an issue with timers becoming corrupted, and one thing that caught my attention was the fact that timer interrupts are not disabled when process_timers is called.
this can lead to it being called while it’s already executing, if one of the timer callbacks takes too long. if this happens after ticksRemain was decremented but before it gets reset to ticks it will overflow.
@tehn @zebra - is there a reason timer interrupts are not disabled in process_timers? or is it not needed in the interrupt handler?
either way checking against overflow wouldn’t hurt i think…