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

Function time

packages/effect/src/Console.ts:613–624  ·  view source on GitHub ↗
(label?: string | undefined)

Source from the content-addressed store, hash-verified

611 * @since 2.0.0
612 */
613export const time = (label?: string | undefined): Effect.Effect<void, never, Scope> =>
614 consoleWith((console) =>
615 effect.acquireRelease(
616 effect.sync(() => {
617 console.time(label)
618 }),
619 () =>
620 effect.sync(() => {
621 console.timeEnd(label)
622 })
623 )
624 )
625
626/**
627 * Logs the elapsed time for an existing timer without stopping it, allowing progress reports for long-running operations.

Callers

nothing calls this directly

Calls 4

consoleWithFunction · 0.85
timeMethod · 0.80
timeEndMethod · 0.80
syncMethod · 0.45

Tested by

no test coverage detected