Enumeration DebounceStyle

Different types of debouncing for the Debounce class.

Enumeration Members

Enumeration Members

AfterWait

Waits the given amount of milliseconds after the first call and then fires the latest assigned callback.

.execute() calls with a 25ms debounce time looks like this:

1st .execute() 2nd .execute() 3rd .execute() - 4th .execute() ...
0ms 10ms 20ms 25ms 30ms 50ms
fired! fired!
FirstThenWait

Fires on the first call, then waits the given amount of milliseconds until another call is allowed through.

.execute() calls with a 25ms debounce time looks like this:

1st .execute() 2nd .execute() 3rd .execute() 4th .execute()
0ms 10ms 20ms 30ms
fired! fired!