You're not really supposed to hold up a multiplayer game so that you can go make a sandwich. It's only 9 holes. You should do that before or after.
If you really need to go then just ask your playing partner(s) to take their time on their shots. Most folks will be kind enough to oblige you. Even if it's only 2 people that's 90 seconds for their shot, 90 seconds for your shot and another 90 seconds with no penalty if you didn't already take a clock penalty (first one's free).
That's four and a half minutes and that should be plenty enough time to use the loo. :)