(nanos: bigint)
| 56 | } |
| 57 | |
| 58 | const nanosToHrTime = (nanos: bigint): [seconds: number, nanos: number] => { |
| 59 | const sign = nanos < bigint0 ? -bigint1 : bigint1 |
| 60 | const absolute = nanos < bigint0 ? -nanos : nanos |
| 61 | return [ |
| 62 | Number(sign * (absolute / bigint1e9)), |
| 63 | Number(sign * (absolute % bigint1e9)) |
| 64 | ] |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * Represents a span of time with high precision, supporting operations from |