1Timer.scheduledTimer(timeInterval: 1,
2 target: self,
3 selector: #selector(YourController.update),
4 userInfo: nil,
5 repeats: true)
6
7// @objc selector expected for Timer
8@objc func update() {
9 // do what should happen when timer triggers an event
10}