TimerSpec

public struct TimerSpec

Specification of timer

  • timer start

    Declaration

    Swift

    public var deadline: Deadline
  • repeat interval

    Declaration

    Swift

    public var interval: Interval
  • timer leeway

    Declaration

    Swift

    public var leeway: DispatchTimeInterval?
  • cancelaltion token for the timer

    Declaration

    Swift

    public var cancellationToken: CancellationToken?
  • interval of events

    See more

    Declaration

    Swift

    public enum Interval
  • timer start

    See more

    Declaration

    Swift

    public enum Deadline
  • Makes DispatchSourceTimer

    Declaration

    Swift

    public func makeTimer(queue: DispatchQueue) -> DispatchSourceTimer

    Parameters

    queue

    queue to handle events on

    Return Value

    DispatchSourceTimer

  • Makes channel that

    Declaration

    Swift

    public func makeTimerChannel<T>(
      executor: Executor = .primary,
      _ maker: @escaping () throws -> T
      ) -> Channel<T, Void>

    Parameters

    executor

    to schedule timer on

    originalExecutor

    Executor you calling this method on. Specifying this argument will allow to perform syncronous executions on strictAsync: false Executors. Use default value or nil if you are not sure about an Executor you calling this method on.

    maker

    block that will be called to produce update for Channel

    Return Value

    Channel