stablestable
Arc standard library reference for the debounce module
The stable module suppresses transient signal changes.
for
stable.for is a debounce: it emits its input value only after the value has held
unchanged for duration. Any change restarts the window, so fluctuations shorter than
duration never propagate, and a newly stable value is emitted once.
numeric | bool -> stable.for{duration: i64 ns} -> numeric | boolParameters
duration: How long the value must hold before it is emitted, as a duration literal (e.g.500ms).
Output
The debounced value, matching the input type.
Channels with variable-size data types, such as str, are not allowed.
// Debounce a value: write afterit holds for 5s
input -> stable.for{ duration=5s } -> output
// Debounce a condition: act only after it holds for 500ms
press_pt > 100 -> stable.for{ duration=500ms } -> vent_cmd