How much longer will pinworms persist if I just started taking medication?  

Depends on the med. There are several prescriptions available which your doctor would tell you how long to take them. But the most common treatment for pinworm, pyrantel pamoate is available over the counter. The typical duration of therapy is about two weeks. However reinfection and spread is very common so it is recommended to treat all those living together and to maintain the highest standards of hygiene .
Depends... Depending upon what treatment was provided, the infectious burden you have (how many pinworms have to be eradicated), & risks of re-exposure. Please also avoid behavior that permits infection by you of others.