call the function after some time in swift 5 code example Example: swift wait 5 seconds sleep(5). // Argument is number of seconds