How quickly after sex should you pee?

Sometimes I don't have to pee immediately after and I just sit there for five minutes drinking water waiting for me to pee. Is that enough to prevent infections?