RepeatingTimer Class Reference
public class RepeatingTimer : Repeater
Safe implementation of a repeating timer for scheduling connectivity checks
-
Declaration
Swift
public init(timeInterval: TimeInterval, repeating: DispatchTimeInterval? = nil, leeway: DispatchTimeInterval = .nanoseconds(0), queue: TealiumQueue, eventHandler: @escaping () -> Void)Parameter Description timeIntervalTimeInterval in seconds until the timed event happens, and repeating interval by default (if ‘repeating’ is not specified)
repeatingThe interval to repeat, otherwise the same timeInterval is reused
queueThe queue to use for the timer
-
The handler that gets called when the timer fires.
Declaration
Swift
public private(set) var eventHandler: (() -> Void)? { get } -
Resumes this timer instance if suspended
Declaration
Swift
public func resume() -
Suspends this timer instance if running
Declaration
Swift
public func suspend()