I haven't had much trouble with my knees (knock on wood...) but I have had a hip injury and calf/quad issues. With my hip injury I stayed away from running until I knew I was better. It took a good couple of weeks to heal up and in that time I did other things like cycling or swimming. I did tons of stretching and foam rolling. My electric heating pad was my best friend and I used it a few times a day. Heat works wonders!
After I was feeling better I started back at running but went shorter distances and watched my speed and form. After each run, I made to take tons of time to stretch. Pretty soon I was back at it!
So I can't give you the exact amount of time it will take to heal. My only advice is to really listen to your body. You will know!
Sending lots of healing vibes your way..... Elaine