Update usage of setTimeout to use timer.