Generic Instance Method

delay(for:tolerance:scheduler:options:)

Delays delivery of all output to the downstream receiver by a specified amount of time on a particular scheduler.

Declaration

func delay<S>(for interval: S.SchedulerTimeType.Stride, tolerance: S.SchedulerTimeType.Stride? = nil, scheduler: S, options: S.SchedulerOptions? = nil) -> Publishers.Delay<Publishers.Concatenate<Prefix, Suffix>, S> where S : Scheduler

Parameters

interval

The amount of time to delay.

tolerance

The allowed tolerance in firing delayed events.

scheduler

The scheduler to deliver the delayed events.

options

Options relevant to the scheduler’s behavior.

Return Value

A publisher that delays delivery of elements and completion to the downstream receiver.

Discussion

The delay affects the delivery of elements and completion, but not of the original subscription.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software