JGSwiftTimer is a lightweight timer extension for Swift. OC
JGSwiftTimer is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "JGSwiftTimer"
import JGTimer.h
executeTask(start: TimeInterval, interval: TimeInterval, repeats: Bool, async: Bool, task: @escaping ()->Void) -> String?
JGTimer.executeTask(start: 3, interval: 1, repeats: true, async: true, task: {self.doTask()})
executeTask(start: TimeInterval, interval: TimeInterval, repeats: Bool, async: Bool, target: AnyObject, selector: Selector) -> String?
JGTimer.executeTask(start: 1, interval: 1, repeats: true, async: true, target: self, selector: #selector(doTask))