Actually I need to implement something like debounce
operator, but let's take an example. If I set debounce for 5 sec, so user can click on button 10 time within 5 sec and just after 5 sec expire the last click event will be taken to account.
What I need is option when 5 sec set as a time range and when user click 10 times just first click will be taken to account immediately and all other clicks that were emitted within 5 sec time range will be dismissed.
After 5 sec user can start clicking again.
How to do it?