Yeast infections

I have a yeast infection and got prescribed to insert cream in the vagina which i already applied and im also pregnant ,how long should i wait to go pee? I want to give the medicine a chance to work .plz help