Every race varies based on the track but each car has a fuel window where they know they can get an exact number of laps per tank of gas. There are times where you will run all the way to that window before pitting, but other times you might pit a little early if there is a caution so you don't...