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

Function withDuration

packages/effect/src/Sink.ts:2068–2071  ·  view source on GitHub ↗
(
  self: Sink<A, In, L, E, R>
)

Source from the content-addressed store, hash-verified

2066 * @since 2.0.0
2067 */
2068export const withDuration = <A, In, L, E, R>(
2069 self: Sink<A, In, L, E, R>
2070): Sink<[A, Duration.Duration], In, L, E, R> =>
2071 summarized(self, Clock.monotonicTimeNanos, (start, end) => Duration.nanos(end - start))
2072
2073/**
2074 * A sink that drains all input and returns the elapsed duration.

Callers 1

Sink.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected