A better setInterval/clearInterval