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

Function roundMillisToNanos

packages/effect/src/Duration.ts:41–41  ·  view source on GitHub ↗
(millis: number)

Source from the content-addressed store, hash-verified

39 BigInt(input < 0 ? Math.ceil(input - 0.5) : Math.floor(input + 0.5))
40
41const roundMillisToNanos = (millis: number): bigint => roundTiesAwayFromZero(millis * 1_000_000)
42
43const parseNanos = (input: string, scale: bigint): bigint => {
44 const decimalIndex = input.indexOf(".")

Callers 3

makeFunction · 0.85
toNanosUnsafeFunction · 0.85
toHrTimeFunction · 0.85

Calls 1

roundTiesAwayFromZeroFunction · 0.85

Tested by

no test coverage detected