scheduleRepeatedTask(initialDelay:delay:notifying:_:)

    Schedule a repeated task to be executed by the EventLoop with a fixed delay between the end and start of each task.

    EventLoop.swift:919
    @discardableResult @preconcurrency func scheduleRepeatedTask(initialDelay: TimeAmount, delay: TimeAmount, notifying promise: EventLoopPromise<Void>? = nil, _ task: @escaping (RepeatedTask) throws -> Void) -> RepeatedTask

    Parameters

    initialDelay

    The delay after which the first task is executed.

    delay

    The delay between the end of one task and the start of the next.

    promise

    If non-nil, a promise to fulfill when the task is cancelled and all execution is complete.

    task

    The closure that will be executed.

    • return: RepeatedTask

    Other members in extension

    Instance members

    Show implementation details (3)

    Hide implementation details

    Show obsolete interfaces (2)

    Hide obsolete interfaces