Limiting triggers density (relax time)

Hello, just polling for different approaches here.
I want to put a relax time to triggers: a filter that allows at most one trigger to pass every x seconds.
Language-side, I would store a timestamp and ignore all subsequent triggers until timestamp+x.
Server-side, I’m doing it like this:

	var trig =,0.01);
	var relaxTime = 0.2;
	var relaxTrig =,>relaxTime);;

It seems like it works fine, but since I guess many people implemented something like this, I’d like to see other approaches :slight_smile:


1 Like

Thanks! I didn’t realize Trig1 alone does this perfectly :slight_smile: