clockevents: prevent endless loop in tick_handle_periodic()