If you can't make it to a bathroom, you can try holding your pee with some tricks like distracting yourself, turning down the ...
The average adult can hold their pee for about 3 hours but if you have trouble with this you probably have some type of urinary incontinence.