You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (this.jitter) {
var rand = Math.random();
var deviation = rand * this.jitter * ms; // 0 <= jitter <= 1
ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation; // so jitter is uniformly distributed on both sides
}
E.g. in https://github.com/segmentio/backo/blob/master/index.js#L38
perhaps try something like: