( self: Schedule<Output, Input, Error, Env> )
| 1091 | * @since 2.0.0 |
| 1092 | */ |
| 1093 | export const jittered = <Output, Input, Error, Env>( |
| 1094 | self: Schedule<Output, Input, Error, Env> |
| 1095 | ): Schedule<Output, Input, Error, Env> => |
| 1096 | modifyDelay(self, ({ duration }) => |
| 1097 | effect.map(randomNext, (random) => { |
| 1098 | const millis = Duration.toMillis(duration) |
| 1099 | return Duration.millis(millis * 0.8 * (1 - random) + millis * 1.2 * random) |
| 1100 | })) |
| 1101 | |
| 1102 | /** |
| 1103 | * Returns a new `Schedule` that outputs the inputs of the specified schedule. |