I wonder what would happen if you simply tried this brute force approach:
Code:
Change this line:

                span = interrupt_time - last_interrupt;
into this:
                span = 2 * (interrupt_time - last_interrupt);