what is the iOS sleep function

aerlfredith picture aerlfredith · Feb 21, 2013 · Viewed 28.6k times · Source

I am looking for a function that puts a thread to sleep on iOS for c++ code, or even objective-c code, sleep(0) is not recognized by my compiler

Thanks,

Answer

user1603602 picture user1603602 · Mar 30, 2014

Block for .5 seconds:

[NSThread sleepForTimeInterval:.5];