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

Method sleep

packages/effect/src/internal/clock.ts:86–91  ·  view source on GitHub ↗
(duration: Duration.Duration)

Source from the content-addressed store, hash-verified

84 }
85
86 sleep(duration: Duration.Duration): Effect.Effect<void> {
87 return core.async<void>((resume) => {
88 const canceler = globalClockScheduler.unsafeSchedule(() => resume(core.void), duration)
89 return core.asVoid(core.sync(canceler))
90 })
91 }
92}
93
94/** @internal */

Callers

nothing calls this directly

Calls 3

syncMethod · 0.80
resumeFunction · 0.70
unsafeScheduleMethod · 0.65

Tested by

no test coverage detected