title: Pause all ongoing asyncAfter() delays in SpriteKit game
body: <p>In my game, meteors fall from the sky. The <code>spawnMeteorite</code> function is called upon at the beginning of the game and calls on itself after a delay has been satisfied, where the new delay between meteorites is slightly less than before.</p>
  
  <pre><code>func spawnMeteorite(timeInterval:Double) {
      delay(timeInterval) {
          self.spawnMeteorite(timeInterval: timeInterval*0.9)
      }
      // Create meteorites
  }
  
  func delay(_ delay:Double, closure:@escaping ()-&gt;()) {
      let when = DispatchTime.now() + delay
      DispatchQueue.main.asyncAfter(deadline: when, execute: closure)
  }
  </code></pre>
  
  <p>I have successfully been able to pause all the animations in my GameScene with <code>self.view?.isPaused = false</code>. However, the meteors continue to spawn, because the code itself still runs. </p>
  
  <p>Is there any way to pause all ongoing delays in my program, so that if the game was paused mid-way through a 3-second delay, when resumed, the delay would continue for 1.5 more seconds? This would mean the rate of meteorite spawns would not be interrupted. Thanks.</p>