Urec.adopt: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/urec.bend as Urec Lines 215-220 of cswap-bend-cli@0.1.0.0/urec.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/urec.bend&start_line=215&end_line=220 import Base import cswap-bend-cli@0.1.0.0/act.bend as Act import cswap-bend-cli@0.1.0.0/ustore.bend as Ustore # Merge measurements another machine took (UsageStore.adopt): a reading # replaces lastGood only when newer than the stored one; `hold` (seconds) # keeps collectors off the slot, never past the reading's earliest window # reset nor an hour past the stored measurement; Some{0} lifts a hold. def adopt(+root: String, rs: List<&2, Reading>, hold: Maybe<&2, U32>, +now: U32) -> Act.of(AR): Ustore.with_usage_lock(AR, root, adopt.act(root, rs, hold, now)) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/act.bend&name=of https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/urec.bend&name=AR https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/urec.bend&name=Reading https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/urec.bend&name=adopt.act https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/ustore.bend&name=with_usage_lock