Jaa


TimeSpanExtensions.WithJitter(TimeSpan, Double) Method

Definition

Generates a uniform distribution between zero and ten percent of the proposed delay and adds it to the delay as random noise to distribute requests across time.

public static TimeSpan WithJitter (this TimeSpan delay, double multiplier = 0.1);
static member WithJitter : TimeSpan * double -> TimeSpan
<Extension()>
Public Function WithJitter (delay As TimeSpan, Optional multiplier As Double = 0.1) As TimeSpan

Parameters

delay
TimeSpan

The requested delay.

multiplier
Double

A multiplier.

Returns

A uniformly distributed time span.

Applies to