Runs an action at most once per interval, executing the first call immediately and ignoring the rest until the interval elapses.

The mirror image of Debounce: use this when the first event in a burst is the interesting one (a keypress, a zone entry) rather than the last.

Constructor

new(intervalMs:Int, action:() ‑> Void)

Variables

Methods

reset():Void

trigger():Bool

Runs the action if the interval has elapsed. Returns whether it ran.