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
Here's the NSTimer way of doing it. It's might be even uglier than the method you're using, but it allows repeating events, so I prefer it.
[NSTimer scheduledTimerWithTimeInterval:0.5f
target:self
selector: @selector(doSomething:)
userInfo:nil
repeats:NO];
You want to avoid something like usleep() which will just hang your app and make it feel unresponsive.