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

Function withDuration

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

Source from the content-addressed store, hash-verified

1946 * @since 2.0.0
1947 */
1948export const withDuration = <A, In, L, E, R>(
1949 self: Sink<A, In, L, E, R>
1950): Sink<[A, Duration.Duration], In, L, E, R> =>
1951 summarized(self, Clock.monotonicTimeNanos, (start, end) => Duration.nanos(end - start))
1952
1953/**
1954 * 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