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,
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.
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.
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.
Block for .5 seconds:
[NSThread sleepForTimeInterval:.5];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With