Larry and Sergey have been working on Google for 17 years. Mark has been working on Facebook for 11. Drew and Arash have now been working on Dropbox for 8 years. Brian, Nate, and Joe have been working on Airbnb for 7 years.
Things change, of course, and you shouldn't work on a company that isn't working for 10 years. But I think it's a reasonable question to ask.
If you go into something with a plan to do it for only a couple of years, you are unlikely to create anything important.
I don't buy public or private equities I don't want to hold for 10 years (I have held some Apple shares 17 years now!), and I don't do jobs I can't see myself doing for 10 years (I ran my company, which was an ok but certainly not huge success, for 7+ years).
I think more people would benefit from taking a long-term view on where they decide to spend their time and money--it's a really useful way to think about opportunity.