I am simply using Delay() for making half-a-second delay.
The equivalent would be the usleep
function, declared in unistd.h
.
Delay
suspends a thread. A run loop is not needed if you don't need to handle events on that thread in the meantime.
سؤال
The CarbonCore/OSUtils.h has been deprecated in Mac OS X 10.8. I was using the Delay()
from it. Now, I need to replace with Cocoa equivalent. I think [[NSRunLoop currentRunLoop] runUntilDate:]
can be a replacement. Please suggest what would be the best replacement for the same. Thanks a lot.
المحلول
I am simply using Delay() for making half-a-second delay.
The equivalent would be the usleep
function, declared in unistd.h
.
Delay
suspends a thread. A run loop is not needed if you don't need to handle events on that thread in the meantime.