Throttled

Limits the values being passed through the handler. The initial value is passed immediately without any delay. After that any value that is received within the given duration is dropped. So the handler is called only once per duration.

Additionally any value received while the handler is still executing is dropped. If duration is 500 milliseconds and the handler takes 600 milliseconds then a value received 550 milliseconds after the previous value will still be dropped.

Constructors

Link copied to clipboard
constructor(duration: Duration)