Terminal: Use requestAnimationFrame for a short timeout