With the best will in the world I don't think it's quite that simple. A guy may have a sensation of needing to pee when he begins masturbating but may not think or realise the need's as urgent as it is. Some people can go from not needing to pee at all to being very desperate within a very short period of time. There are others who sometimes masturbate, but with no intention of cumming, as a means of buying themselves time when they need to go to the toilet but one isn't available. I've done that before and, although it's not an alternative to peeing, I've found it has helped to buy me valuable minutes when I've needed them. I think if I said, "hands up who's never masturbated when they've needed to pee" I wouldn't see that many hands!