prevent iphone to sleep swift
UIApplication.sharedApplication().idleTimerDisabled = true
prevent iphone to sleep swift
UIApplication.sharedApplication().idleTimerDisabled = true
swift thread.sleep
while (true){
print("sleep for 2 seconds.")
sleep(2) // working
}
swift sleep milliseconds
usleep(1000000) //will sleep for 1 second
usleep(2000) //will sleep for .002 seconds
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us