How long can I wait to pee after sex?

My bf and I had morning sex today and we cuddled for a few minutes and just as I was about to go pee I heard his roommate walk to the only bathroom in the apartment and turn on the shower. He then spent thirty minutes in there, and I had to wait. Now my vag feels uncomfy and I have pain/irritation with urinating. Could I have gotten a uti this quick? Also how long is the max to go without peeing after sex before putting yourself in real danger of a uti?