def set_lifetime_packed
import bend-collections@1.0.0.0/src/containers/lru.bend as Lruimport Base
import bend-collections@1.0.0.0/src/math/u64.bend as W
580# Lifetime in nanoseconds; zero means entries never expire. It is kept in
581# milliseconds, so a deadline is one limb addition.
582def set_lifetime_packed(a, -V: Kind(a), f: LRU<a, V>, +ns: W.U64) -> LRU<a, V>:
583 F{cap, n, head, tail, free, m, tab, ks, ents, lk} = f
584 F{cap, n, head, tail, free, set_life(m, W.div_small_signed(ns, 1000000), W.carry(Bool.not(W.is_zero(ns)))), tab, ks, ents, lk}
Uses (7)
Used by (0)
No other definition uses this definition.