Hamstring, and other muscle/tendon, issues can take a long time to heal. The key is providing the appropriate load (usually done via eccentric strengthening) to promote tissue remodeling and increase resiliency of the tissue so you avoid future injury. It is also important to look at the kinetic chain of motion - low back, pelvis, hips, knee, ankle, etc. and what the demands of your activities are. There are many hip joint stretches, mobility exercises, and self joint mobilization strategies that can be done with improve hip mobility. It's important to assess what needs to be improved and make a plan of attack based on your specific movement patterns and needs.