Answers for "swift sleep example"

1

swift thread.sleep

while (true){
    print("sleep for 2 seconds.")
    sleep(2) // working
}
Posted by: Guest on October-21-2020
0

swift sleep milliseconds

usleep(1000000) //will sleep for 1 second
usleep(2000) //will sleep for .002 seconds
Posted by: Guest on June-13-2021

Code answers related to "Swift"

Browse Popular Code Answers by Language