move on_second_tick callout to on_idle event, also provide a flag to detect interrupt...