Substitute setInterval