AKPeriodicFunction

public class AKPeriodicFunction: AKOperationGenerator

A class to periodically perform a callback

  • Repeat this loop at a given period with a code block

    Declaration

    Swift

    public init(every period: Double, handler: @escaping () -> Void)

    Parameters

    period

    Interval between block executions

    handler

    Code block to execute

  • Repeat this loop at a given frequency with a code block

    Declaration

    Swift

    public convenience init(frequency: Double, handler: @escaping () -> Void)

    Parameters

    frequency

    Period, or interval between block executions

    handler

    Code block to execute