Scheduler
public final class Scheduler
                A scheduler for onFixedFrame events.
- 
                  
                  
Gets the singleton global instance of
Scheduler.Declaration
Swift
public static let instance: Scheduler - 
                  
                  
Event invoked every time
onFixedFrameis invoked; usually aligned to the display’s refresh rate.The
TimeIntervalprovided to the function is the time interval elapsed since the last fixed frame event was issued.Declaration
Swift
@Event <TimeInterval> public var fixedFrameEvent: EventSource<TimeInterval> { get } - 
                  
                  
Raises the
fixedFrameEventevent. Should be invoked at an interval that is equal to the refresh rate of the monitor.Declaration
Swift
public func onFixedFrame(_ intervalInSeconds: TimeInterval) - 
                  
                  
Schedules a timer to fire at a specified interval.
The timer will fire in the main
RunLoop, withRunLoop.Mode.defaultmode.The timer is scheduled to fire
intervalseconds after the current date at the time of calling this method, and ifrepeatsis passed astrue, everyintervalseconds afterwards untilSchedulerTimerType.invalidate()is called on the returned timer object.Precision of the timer is undefined, but it is guaranteed to not fire before its scheduled time.
Declaration
Swift
public func scheduleTimer(interval: TimeInterval, repeats: Bool = false, _ block: @escaping () -> Void) -> SchedulerTimerType