In some instances, drivers even set the exact same time to three decimal places. In that case, F1 does not use a fourth decimal place to determine the order. Instead, whichever driver set that lap time first is given priority on the leaderboard.
It is much less common for drivers to finish within a few thousandths of each each other at the end of a race, but in those instances, F1 uses analysis of high-quality, high-speed video footage to determine which car was ahead at the line.
If two cars finish the race with the same time to three decimal places, and video footage also suggests they crossed the line at the exact same point, then the points for both finishing positions are added together, divided by two, and awarded to each driver.
At the 1997 European Grand Prix at Jerez in Spain, Michael Schumacher, Jacques Villeneuve and Heinz-Harald Frentzen all set precisely the same time to three decimal places in qualifying. As Villeneuve set the time first, he qualified on pole position.