yeast pill ?

how long after you take the medicine does a yeast infection go away? my dr prescribed me a pill and i want it gone by the time my period starts in like 3 days plus i miss sex