def Duration.to_us_nat

bend-kit-time@0.3.0.0 · time.bend:66

import bend-kit-time@0.3.0.0/time.bend as Time
import Base
import bend-kit-int@0.2.0.0/int.bend as Int

66# Whole microseconds, rounded down; 0 when d is negative.
67def Duration.to_us_nat(d: Duration) -> Nat:
68  match d:
69    case Duration{s, n}:
70      Duration.to_nat.of(Int.I64.to_nat(s), 1000000n, (n / 1000 : U32))

Uses (6)

Used by (1)