def Duration.add

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

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

79def Duration.add(a: Duration, b: Duration) -> Duration:
80  match a b:
81    case Duration{sa, na} Duration{sb, nb}:
82      +n = (na + nb : U32)
83      Duration.carry(U32.is_ge(n, 1000000000), Int.I64.add(sa, sb), n)

Uses (6)

Used by (8)