Time.Sleep
eff SleepSourceAn effect used to sleep the current thread.
Operations
Definitions
Handles the Sleep effect of the given function f.
In other words, re-interprets the Sleep effect using the IO effect.
@DefaultHandler Runs the Sleep effect of the given function f.
In other words, re-interprets the Sleep effect using the IO effect.
Runs the given function f collecting all sleep durations into a list.
Returns a pair of the result and the list of durations in call order.
Middleware that intercepts the Sleep effect, replacing each sleep duration
with the given constant duration, ignoring the original duration.
Middleware that intercepts the Sleep effect, adding random jitter to each
sleep duration. The factor controls the maximum jitter fraction, e.g. 0.2
means each sleep duration is randomly adjusted by up to ±20%.
Middleware that intercepts the Sleep effect, logging each sleep duration
via the Logger effect and re-raising the Sleep effect.
Middleware that intercepts the Sleep effect, capping each sleep duration
to the given cap.
Middleware that intercepts the Sleep effect, capping the total cumulative
sleep duration to the given budget. Once the budget is exhausted, all
further sleeps become no-ops.
Middleware that intercepts the Sleep effect, ensuring each sleep duration
is at least the given floor.
Runs the given function f ignoring all sleeps (no-op).