In races started by a starting gun, a sensor is typically attached to the gun which sends an electronic signal to the timing system when fired.
Recently, there have been significant advances in full-frame video timing which utilizes a full sensor array rather than a single line.