def next_poll
import cswap-bend-cli@0.1.0.0/tui/view.bend as Viewimport Base
import cswap-bend-cli@0.1.0.0/tui/fmt.bend as F
89def next_poll(+live: Bool, +n: Maybe<&2, U32>, +now: U32) -> Maybe<&2, String>:
90 match live n:
91 case True{} Some{t}:
92 Some{F.sel.s(U32.is_gt(t, now), "next poll in " ++ F.duration((t - now : U32)), "polling now")}
93 case _ _:
94 None{}