clear interval when state changes from idle, and restart it when it comes back from idle.