MCPcopy Create free account
hub / github.com/Effect-TS/effect / duration

Function duration

packages/effect/src/Schedule.ts:752–759  ·  view source on GitHub ↗
(durationInput: Duration.Input)

Source from the content-addressed store, hash-verified

750 * @since 2.0.0
751 */
752export const duration = (durationInput: Duration.Input): Schedule<Duration.Duration> => {
753 const duration = Duration.fromInputUnsafe(durationInput)
754 return fromStepWithMetadata(effect.succeed((meta) =>
755 meta.attempt === 1
756 ? effect.succeed([duration, duration])
757 : Cause.done(Duration.zero)
758 ))
759}
760
761/**
762 * Returns a new `Schedule` that will always recur, but only during the

Callers

nothing calls this directly

Calls 3

fromStepWithMetadataFunction · 0.85
succeedMethod · 0.45
doneMethod · 0.45

Tested by

no test coverage detected