The problem is that the time it takes a startup to succeed is different for every type of startup so it's hard to come up with a rule of when you should quit and give up. There have been plenty of startups that started out slow and then exploded a couple years later.
So the real question becomes, how do you know when to quit and when to keep going?