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

Function adjust

packages/effect/src/testing/TestClock.ts:377–382  ·  view source on GitHub ↗
(input: Duration.Input)

Source from the content-addressed store, hash-verified

375 }, runSemaphore.withPermits(1))
376
377 function adjust(input: Duration.Input) {
378 const duration = Duration.fromInputUnsafe(input)
379 const millis = Duration.toMillis(duration)
380 const nanos = Number.isFinite(millis) ? Duration.toNanosUnsafe(duration) : undefined
381 return warningDone.pipe(Effect.andThen(run((timestamp) => timestamp + millis, nanos)))
382 }
383
384 function setTime(timestamp: number) {
385 return warningDone.pipe(Effect.andThen(run(() => timestamp)))

Callers

nothing calls this directly

Calls 4

testClockWithFunction · 0.85
adjustMethod · 0.80
pipeMethod · 0.65
runFunction · 0.50

Tested by

no test coverage detected