Corrected interval timer logic