PowerArgs.ActionDebouncer.Trigger C# (CSharp) Method

Trigger() public method

Triggers a burst. If this is the first trigger in a burst of events then a countdown of duration BurstTimeWindow begins. If this trigger occurs while the countdown is in the process of counting to zero then the countdown is reset. If the countdown ever hits zero then the callback fires and the burst is complete.
public Trigger ( ) : void
return void
        public void Trigger()
        {
            if (BurstTimeWindow == TimeSpan.Zero)
            {
                callback();
            }
            else
            {
                endOfBurstTimerDetectionTimer.Change((int)BurstTimeWindow.TotalMilliseconds, Timeout.Infinite);
            }
        }