There is definitely no indefinite time you need to take to stretch. Take as long as you need to get a good stretch, holding each stretch for about 15-20 seconds, also focusing on the muscle group you worked out that day. This should normally take no more then 30 mins to get a good full body stretch.
I always recommend that if my clients like to stretch before their workout they warm up for about 5 minutes. Cold muscles don’t stretch as well and you risk muscle tears. I have my clients stretch at the end of their workouts for about 10 minutes focusing on the muscles they used during their training. If we do a heavy weight workout, I may have them stretch after each exercise. If everyone had the time I would love to have them stay and stretch more!
This may depend on a few different factors but typically you’d want to be warmed up first for at least 5 minutes, (stretching cold muscles not so good). I recommend more dynamic stretching before a workout, while keeping the static stretches for after… (this allows the muscles to get back to the proper length and should be held for 20-30 seconds).
Since I have been a MELT Instructor, I have a different take on stretching. MELT works on lengthening the connective tissue. People are encourage to assess and re-assess before and during MELT; the goal is to bring the body into better alignment using specific techniques. As such, I recommend to MELT after cardiovascular exercises and before strength training. You will find that your flexibility is increased greatly through MELT, and you can actually use a stretch as an assessment tool.