Return an observable that emits an item if a particular timespan has passed without emitting another item from the source observable.
More...
Go to the source code of this file.
|
| template<class... AN> |
| auto | rxcpp::operators::debounce (AN &&...an) -> operator_factory< debounce_tag, AN... > |
| | Return an observable that emits an item if a particular timespan has passed without emitting another item from the source observable. More...
|
| |
Return an observable that emits an item if a particular timespan has passed without emitting another item from the source observable.
- Template Parameters
-
| Duration | the type of the time interval |
| Coordination | the type of the scheduler |
- Parameters
-
| period | the period of time to suppress any emitted items |
| coordination | the scheduler to manage timeout for each event |
- Returns
- Observable that emits an item if a particular timespan has passed without emitting another item from the source observable.
- Sample Code
using namespace std::chrono;
auto start = scheduler.now();
auto period = milliseconds(10);
values.
[](long v) { printf("OnNext: %ld\n", v); },
[]() { printf("OnCompleted\n"); });
OnNext: 1
OnNext: 2
OnNext: 4
OnCompleted
| #define RXCPP_OPERATORS_RX_DEBOUNCE_HPP |