title: Trying to get NSTimers to synchronise when they are fired swift
body: <p>I am trying to create a game where the user has to navigate a ball through gaps in platforms (known as fall down). When the score reaches a certain point, the moving platforms are created at a faster rate. To achieve this I wrote the code below: </p>
  
  <pre><code>switch String(level) {
  
                          case "1" :
                              beginLevel.invalidate()
                              level1 = NSTimer.scheduledTimerWithTimeInterval( 0.9 , target: self, selector: Selector("platformCreation"), userInfo: nil , repeats: true)
  
                          case "2" :
                              level1.invalidate()
                              level2 = NSTimer.scheduledTimerWithTimeInterval( 0.8 , target: self, selector: Selector("platformCreation"), userInfo: nil , repeats: true)
  
                          case "3" :
                              level2.invalidate()
                              level3 = NSTimer.scheduledTimerWithTimeInterval( 0.7 , target: self, selector: Selector("platformCreation"), userInfo: nil , repeats: true)
  
                          case "4" :
                              level3.invalidate()
                              level4 = NSTimer.scheduledTimerWithTimeInterval( 0.6 , target: self, selector: Selector("platformCreation"), userInfo: nil , repeats: true)
  
                          default :
                             print("invalid level")
                          }
  </code></pre>
  
  <p>beginLevel is ran whenever the game restarts, and level can only be 1- 4.</p>
  
  <p>The issue I am having with this is that once the previous NSTimer is invalided, there is a delay where no platforms are created, before the new one is fired. These delays make the game too easy and in all honestly it looks ugly too! Which I'm trying to achieve is a constant flow of platforms with no huge gaps between platforms. Anything you can offer to this issue is hugely appreciated. </p>