Very often flash butt welding is controlled by distance rather than time such that the flashing would occur for a pre-determined length, say 5 mm, before the upsetting cycle starts.
At the end of upsetting there is commonly a 'hold time' during which the joint is held still to allow the joint to cool and the two pieces of metal to completely bond.