For American airlines, a flight counts as on time if it departs from the gate or arrives at the gate less than 15 minutes after its scheduled time. Large airlines file monthly on-time reports, and the government publishes the results.
Even the official clock allows a margin.