I want an action to be run after 120 seconds but for the rest of the code to continue to run without interruption is there a way to do this in swift? For example
var timer = 0
if timer == 120{
print("time up")
}
//But This code still needs to be able to be run
if buttonPressed == true{
print("pressed")
}