A freight train's emergency brake is applied at 40 MPH. How long does it take to stop?

This video captures a freight train engaging its emergency brake (about 2m in) and grinding slowly to a stop. Momentum is everything... until it's nothing.