auto timer reset in the main loop