Safe crossing
The gate is up by default and takes 1 second to lower if there's nothing in sight. The countdown starts when the play approaches AND there's no train inside the gate.
If you don't mind having the gate lowered when not in use (and have it raise whenever a train passes by) check out Rafael Mourãos work which is perfectly safe and well functioning and it's more compact (Doesn't use combinators). It's just I don't like having the gates constantly closing and opening, and also leaving it open.
