title: Execute action of code after certain amount of time in swift
body: <p>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 </p>
  
  <pre><code>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")
  }
  </code></pre>