Check out example codes for "swift setinterval". It will help you in understanding the concepts better.
Code Example 1
var helloWorldTimer = Timer.scheduledTimer(timeInterval: 60.0, target: self, selector: #selector(ViewController.sayHello), userInfo: nil, repeats: true)
@objc func sayHello()
{
NSLog("hello World")
}
Learn ReactJs, React Native from akashmittal.com