MCPcopy Index your code
hub / github.com/Effect-TS/effect / duration

Function duration

packages/effect/src/internal/schedule.ts:669–684  ·  view source on GitHub ↗
(
  durationInput: Duration.DurationInput
)

Source from the content-addressed store, hash-verified

667
668/** @internal */
669export const duration = (
670 durationInput: Duration.DurationInput
671): Schedule.Schedule<Duration.Duration> => {
672 const duration = Duration.decode(durationInput)
673 const durationMillis = Duration.toMillis(duration)
674 return makeWithState(true as boolean, (now, _, state) =>
675 core.succeed(
676 state
677 ? [
678 false,
679 duration,
680 ScheduleDecision.continueWith(Interval.after(now + durationMillis))
681 ] as const
682 : [false, Duration.zero, ScheduleDecision.done] as const
683 ))
684}
685
686/** @internal */
687export const either = dual<

Callers 1

fromDelayFunction · 0.70

Calls 2

makeWithStateFunction · 0.85
decodeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…