Four years is not so long. You certainly at least learned what you DONT want to do for the the rest of your life. And four years experience with one employer looks better on a resume than four separate one-year jobs (unless you were a contractor) and also better than four years of unemployment.
Yup. I think I learnt a lot in these four years, sometimes I look back and wish I had focused on startups earlier but I realize I still had a long ways to go back then.
I finally quit this past May and joined a former co-worker on his new startup, so it all worked out in the end.
I have a similar story -- 5 years at a company where I ended up being bored and not caring about the work. But I learned a lot during those 5 years, and was able to take advantage of several opportunities that may not have otherwise been available to me.
And like you, I'm now at a startup, that I love (heh, most of the time), where I've been for the past 11 months. It's all about timing, I guess.