Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the iOS sleep function

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,

like image 554
aerlfredith Avatar asked Feb 21 '13 14:02

aerlfredith


People also ask

What does sleep do on iOS?

Setting Up Sleep Mode The next sleep feature is called Sleep mode. When enabled, Sleep mode automatically puts your phone into Do Not Disturb mode during your scheduled sleep time. It automatically disables Do Not Disturb after your wake time.

What does sleep mean on Apple?

Sleep mode turns off your Apple Watch display and turns on Do Not Disturb, which silences your notifications, in an effort to reduce distractions before bedtime.

Can calls come through on sleep mode?

Yes, Sleep Cycle will still work as it should even if the Do not Disturb-mode is activated. Incoming phone calls, messages, and notifications will always be muted if you use the Do Not Disturb on your phone. If you need notifications enabled at night, simply don't use the Do Not Disturb on your phone.


1 Answers

Block for .5 seconds:

[NSThread sleepForTimeInterval:.5]; 
like image 118
user1603602 Avatar answered Oct 20 '22 15:10

user1603602