PeriodSelector

public struct PeriodSelector : TimeIntervalSelector

Generates time intervals based on a repeated period, and optionally considering a schedule and an origin date-time.

  • Undocumented

    Declaration

    Swift

    public init(for period: Double, in unit: TimeUnit = .seconds,
                schedule: ScheduleDefinition = .continuous,
                origin: Time = .reference,
                offset: Double = 0, offsetIn offsetUnit: TimeUnit = .seconds)
  • Undocumented

    Declaration

    Swift

    public var period: Double
  • Undocumented

    Declaration

    Swift

    public var unit: TimeUnit
  • Undocumented

    Declaration

    Swift

    public var schedule: ScheduleDefinition
  • Undocumented

    Declaration

    Swift

    public var origin: Time
  • Returns repeating times within the input interval, given the specified period, the time unit to use for interpreting the period value, the considered schedule, and the origin time to serve as periodical phase (if specified).

    Declaration

    Swift

    public func times(in interval: TimeRange) -> [TimeRange]