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

Function clockWith

packages/effect/src/internal/defaultServices.ts:56–57  ·  view source on GitHub ↗
(f: (clock: Clock.Clock) => Effect.Effect<A, E, R>)

Source from the content-addressed store, hash-verified

54
55/** @internal */
56export const clockWith = <A, E, R>(f: (clock: Clock.Clock) => Effect.Effect<A, E, R>): Effect.Effect<A, E, R> =>
57 defaultServicesWith((services) => f(services.unsafeMap.get(clock.clockTag.key)))
58
59/** @internal */
60export const currentTimeMillis: Effect.Effect<number> = clockWith((clock) => clock.currentTimeMillis)

Callers 2

sleepFunction · 0.85
defaultServices.tsFile · 0.85

Calls 3

defaultServicesWithFunction · 0.85
getMethod · 0.65
fFunction · 0.50

Tested by

no test coverage detected