If it's timed (like these:
http://planetultra.com/portfolio/king-of-the-mountains/) I make minimal stops. Just enough to get water (handups are not allowed) and check in at the checkpoints.
If it's not timed and I am keeping track of time, I may just track riding time and stop at some of the rest stops for food and water.
If it's not timed and I'm not tracking time, I'm probably riding with other people so what I do is partly driven by what they're doing. It might be a social century or a hammerfest or some of each in the same ride.
Races are a different thing entirely. Unless they're really long (like 6 hours+) there's no stopping.