introduce blocking to synchronize timer and interrupts