Ultra Sound Tip??

I am going for an ultra sound today to find out if I have PCOS. The last time i went for one I had to drink and litre and half of water an hour before i arrived at the doctors. But I was sitting waiting for almost 3 hours in horrible pain because I needed to pee so bad but was not allowed. I have to drink the same amount and I dont know how long I will be waiting. Any tips on how to not nearly wet myself or have to rush to the toilet?