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

Function toSeconds

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

Source from the content-addressed store, hash-verified

809 * @since 2.0.0
810 */
811export const toSeconds = (self: Input): number =>
812 match(fromInputUnsafe(self), {
813 onMillis: (millis) => millis / 1_000,
814 onNanos: (nanos) => Number(nanos) / 1_000_000_000,
815 onInfinity: () => Infinity,
816 onNegativeInfinity: () => -Infinity
817 })
818
819/**
820 * Converts a Duration to minutes.

Callers

nothing calls this directly

Calls 3

fromInputUnsafeFunction · 0.85
matchFunction · 0.70
NumberInterface · 0.70

Tested by

no test coverage detected