fix scope of timeout/missed_ticks variables