It can take forever, thats not the answer you're looking for, huh?...LOL.
You should investigate "yin yoga". (See http://www.yinyoga.com/)
The vinyasa classes you're probably attending, will flow (relatively quickly) from one pose to another, with an emphasis on the athletic side of the practice (for example down dog, step forward, high lunge, warrior 1, warrior 2, etc.), which will be fun, get you to sweat and you'll feel like your muscles "got their money's worth".
But that's not what you want... you want to increase your flexibility. Yin yoga is very slow, holding positions for up to five minutes, or more. Few boutique studios will attract "soccer moms" for a $30 forty five minute class that includes meditation, four poses on each side and then a couple of ohmmmms...so they typically don't emphasize yin.
What are yin poses? How do they help with flexibility?
They are poses that you stay with for such a long time that the muscles or tendons relax and you get very deep stretches or twists. For example, pigeon. In a typical flow class, you may stay in the position for up to a minute (come on people!!! we need to do a more chaturangas!!) . Next time you're practicing at home, try staying in pigeon for five minutes, try ten.
Assess how you feel after a minute, then see how that sensation changes the longer you hold the position. Try legs up the wall, for five minutes, then a few variations (cross ankle over knee and then slide heel down wall) each for a few minutes.
You won't sweat, you won't feel exhausted, you're heart rate monitor might go into sleep mode and you won't be able to boast a 1000 calorie day. But, over time, you'll build up your flexibility (with the emphasis on "over time").
Did you ever play with Chinese handcuffs? The harder you pull, the more resistance you'll encounter, but the more gently you proceed, the looser the trap. Same with your hamstrings. If you think like it's an athletic competition and try to fight...you'll lose (every time). Get to a resistance point (when your body starts fighting you) and stop, then take slow deep breaths, calm your mind, relax...tell you body "it's okay", wait ten seconds and slowly move deeper, until you hit the next stop...lather, rinse, repeat...
Guys typically are less flexible, especially if your athletic, since running, spinning, etc. tends to tighten up the muscles.
I started yoga three years ago at age 56, doing it (nearly) every day of the year. I do legs up the wall for a minimum of five minutes at the beginning of every practice. Progress? I'm more flexible, but still bend my knees in fold, etc.
Every body is different, depending on how your shoulders and scapula are constructed, you may not be able to. Recognize and accept your own body's limitations and work within your abilities. I've been trying reverse namaste for 2 years and can't get close...I've seen women do it the first time they try.
Warning, zen ahead...proceed at your own risk... --> yoga isn't complaining about what you can't do, rather it's about celebrating what you can. It's not about achieving that perfect pose (you know, the ones that people post on Instagram), but understating what is happening in your body. It's a lifetime pursuit. Some days you'll make progress (I used to time myself and set a goal of holding pigeon for 30 seconds...now I mentally complain if the instructor doesn't hold it long enough)...other days the body won't cooperate. Don't worry about it.
At the beginning of class, many instructors will lead a meditation and work through breathing techniques, pay attention and focus on the practice. You're allowed to use them on your own at any time you want during the session. You can meditate during warrior 2 (and maybe you'll be able to ignore your thigh muscles crying "uncle!").
If you practice on your own, don't worry about the flows, try spending 45 minutes just doing slow deep stretches.
You may know how to stretch...but do you know how long to stretch?
If you're a guy with a competitive personality, you will have to understand that you can't power through the tightness.
It will come, but slowly. Just be patient and positive.
One more thing, take your timeline, fold it carefully, putting it safely in an envelope, then seal the envelope and gently place it in the recycling bin or shredder.
(see link in my signature #3)