title: Swift Timer.scheduledTimer() doesn't work
body: <p>I have two views in my swift app. I am performing a segue as below. </p>
  
  <p>ViewController.swift -----------------> GameViewController.swift</p>
  
  <p>When loading the GameViewController an value array also passed to GameViewController.swift from ViewController.swift</p>
  
  <p>A timer should be initialized in GameViewController.swift</p>
  
  <p>I tried to initialize a timer and call a method through it, but it doesn't work.</p>
  
  <p>Followings are my code snippets.</p>
  
  <p>ViewController.swift</p>
  
  <pre><code>func signIn(difficultyLvl:String){
      let username = usernameTxt.text
      let password = passwordTxt.text
  
      let url = URL(string: "http://192.168.1.106/speed/scoreBoardController.php?username="+username!+"&amp;password="+password!+"&amp;action=SIGNIN")
  
      let task = URLSession.shared.dataTask(with: url!) {(data, response, error) in
          let isPassed = String(data: data!, encoding:.utf8)?.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
  
          var gameViewControllerParams = [Int: [String: String]]()
          gameViewControllerParams[0] = ["userId" : isPassed!]
          gameViewControllerParams[1] = ["difficultyLvl" : difficultyLvl]
  
          if(isPassed != "null"){
              self.performSegue(withIdentifier: "gotoGame", sender: gameViewControllerParams)
          }
      }
  
      task.resume()
  }
  </code></pre>
  
  <p>GameViewController.swift</p>
  
  <pre><code>class GameViewController: UIViewController {
  
      var gameViewControllerParams = [Int: [String: String]]()
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          let _ = Timer.scheduledTimer(timeInterval: 1.0, target:self, selector: #selector(self.setCalculationLs), userInfo:nil,repeats: true)
      }
  
      func setCalculationLs(){
          print("Timing")
      }
  
  }
  </code></pre>