Webhooks.window: def of bend-kit-webhooks@0.11.0.1 Import: import bend-kit-webhooks@0.11.0.1/webhooks.bend as Webhooks Lines 94-100 of bend-kit-webhooks@0.11.0.1/webhooks.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&start_line=94&end_line=100 import Base import bend-kit-time@0.3.0.0/time.bend as Time import bend-kit-int@0.2.0.0/int.bend as Int # t within tol seconds of now, either way. def window(+tol: U32, now: Time.Instant, t: Int.I64) -> Result<&1, &1, Err, Unit>: match now: case Time.Instant{n, ns}: +d = Int.I64.sub(n, t) +w = Int.I64.from_u32(tol) window.pick(Int.I64.is_gt(d, w), Int.I64.is_lt(d, Int.I64.neg(w))) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-kit-int@0.2.0.0/int.bend&name=I64 https://jend.leeeet.dev/definition.txt?path=bend-kit-int@0.2.0.0/int.bend&name=I64.from_u32 https://jend.leeeet.dev/definition.txt?path=bend-kit-int@0.2.0.0/int.bend&name=I64.is_gt https://jend.leeeet.dev/definition.txt?path=bend-kit-int@0.2.0.0/int.bend&name=I64.is_lt https://jend.leeeet.dev/definition.txt?path=bend-kit-int@0.2.0.0/int.bend&name=I64.neg https://jend.leeeet.dev/definition.txt?path=bend-kit-int@0.2.0.0/int.bend&name=I64.sub https://jend.leeeet.dev/definition.txt?path=bend-kit-time@0.3.0.0/time.bend&name=Instant https://jend.leeeet.dev/definition.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&name=Err https://jend.leeeet.dev/definition.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&name=window.pick