Generic Instance Method

measureInterval(using:options:)

Measures and emits the time interval between events received from an upstream publisher.

Declaration

func measureInterval<S>(using scheduler: S, options: S.SchedulerOptions? = nil) -> Publishers.MeasureInterval<Publishers.Output<Upstream>, S> where S : Scheduler

Parameters

scheduler

The scheduler on which to deliver elements.

options

Options that customize the delivery of elements.

Return Value

A publisher that emits elements representing the time interval between the elements it receives.

Discussion

The output type of the returned scheduler is the time interval of the provided scheduler.