Is there a more straightforward way to wait for a specific amount of time in Cocoa than what I have come up with below?
- (void) buttonPressed {
[self ma
You probably want to use an NSTimer and have it send a "doStuffAfterWaiting" message as your callback. Any kind of "sleep" will block the thread until it wakes up. If it's in your U.I. thread, it'll cause your app to appear "dead." Even if that's not the case, it's bad form. The callback approach will free up the CPU to do other tasks until your specified time interval is reached.
This doc has usage examples and discusses the differences on how & where to create your timer.
Of course, performSelector:afterDelay: does the same thing.