Timer lengthsThe clock changes by situation
In MLB, the pitch timer uses a 30-second timer between batters, a shorter timer with the bases empty, and a longer timer when runners are on base. The current MLB glossary describes 15 seconds with the bases empty and 18 seconds with runners on base.
Batter readinessThe hitter has a deadline too
The batter cannot wait until the final instant. MLB requires the batter to be in the box and alert to the pitcher by the 8-second mark. If the batter violates that requirement, the penalty is an automatic strike.
Pitcher violationsWhat creates an automatic ball
The pitcher must begin the motion to deliver before the timer expires. If the pitcher is late, the umpire adds an automatic ball to the count. That can create a walk, so a timer violation can directly put a batter on base.
DisengagementsPickoffs and step-offs are limited
With runners on base, a pitcher can reset the timer by stepping off or attempting a pickoff, but those disengagements are limited. MLB generally allows two disengagements per plate appearance, with the limit reset if runners advance. A third pickoff attempt must succeed, or the runner is awarded the next base.