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

Function toMillis

packages/effect/src/Duration.ts:788–794  ·  view source on GitHub ↗
(self: Input)

Source from the content-addressed store, hash-verified

786 * @since 2.0.0
787 */
788export const toMillis = (self: Input): number =>
789 match(fromInputUnsafe(self), {
790 onMillis: identity,
791 onNanos: (nanos) => Number(nanos) / 1_000_000,
792 onInfinity: () => Infinity,
793 onNegativeInfinity: () => -Infinity
794 })
795
796/**
797 * Converts a Duration to seconds.

Callers

nothing calls this directly

Calls 3

fromInputUnsafeFunction · 0.85
matchFunction · 0.70
NumberInterface · 0.70

Tested by

no test coverage detected