party etiquette?

So how long do you have to stay at a costume party (or any party for that matter) that you really don’t want to be at? I’m thinking 30nins, which would mean I have 15mins left to stay out here in the cold. This isn’t a “Joe be depressed” moment; more of a “Joe pissed off at someone at the party” moment. Gawd, I am going to hold on to this for a long time, I just know it.