requestAnimationFrame replace setTimeout