Somewhere around 15 years for 401k's, but I started earlier, having IRA's as part of the retirement package.
I didn't have access to a 401K early in my career. When it was finally offered, I thought "deferring taxes will be FREE MONEY!" and contributed the maximum. This was the last week of 2004. There was initially no company match. Toward the end, they offered a 2.5% match with a cap at $2000/yr IIRC. I maxed IRAs throughout, too.
Later, Roths were introduced. I projected that my money would be eventually paying more taxes than my salary and increased to all Roth, increasing my contributions even more. I didn't make that great of an hourly wage but had overtime available so I worked long hours to be able to afford over 50% of my base pay going to my retirement. When Catch up provisions became availabe, I increased again to continue the maximum contributions. I wasn't a believer of bonds and was always staying 100% invested into equities. That choice turned out very well, over all.
I retired in 2016 with $1.1M in combined 401K and IRAs. I have not taken any money out, but have been converting gradually to Roth growth, using other funds to pay taxes. I finished converting last year.
We still have a few years to convert my SO's money to Roths. It will stretch out for another 5? years. Health tables steered us to accelerate my converting money to Roth. Now it's SO's turn. At 70, we expect to be fully converted, and will start taking Soc Sec, assuming that rules don't change. SO will break $1M in Roths before 70.5, but usually chose to not max out 401K contributions. We are the odd couple that kept separate finances, both competing and co-operating in expenses. It worked well for us, but is a road less travelled.