Or use your average dispatch time, since the train is not always dispatched at the exact same time, and you also have to factor in the time it takes for a train to get from B-Brake to A-Brake. Once the train is secure, the time starts, then also add in the time it takes for the train to leave the station, and add that to the A-B time. Theoretically, neopuma has a good solution, but nannerdw is practical.