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.TryComparison<Upstream>, 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.