Here are the steps. Firstly the pitcher releases the baseball, then it takes about 75 milliseconds for your brain to identify the ball, which leads to about 150 milliseconds for the batter to decide if he is going to swing, if it is going to hit him, where the ball is going to land in the strike zone, and when to swing. All it 150 milliseconds. Then after that, the batter must swing, for a major league hitter it takes 100 to 150 milliseconds. Which leaves pretty much zero margin for error.