Reset timer in loop