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

Function toMicros

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

Source from the content-addressed store, hash-verified

865 * @since 4.1.0
866 */
867export const toMicros = (self: Input): number =>
868 match(fromInputUnsafe(self), {
869 onMillis: (millis) => millis * 1_000,
870 onNanos: (nanos) => nanosToUnit(nanos, 1_000),
871 onInfinity: () => Infinity,
872 onNegativeInfinity: () => -Infinity
873 })
874
875/**
876 * Converts a Duration to milliseconds.

Callers

nothing calls this directly

Calls 3

nanosToUnitFunction · 0.85
matchFunction · 0.70
fromInputUnsafeFunction · 0.70

Tested by

no test coverage detected