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.
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\n
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: 3
OnNext: 4
OnCompleted
◆ RXCPP_OPERATORS_RX_DEBOUNCE_HPP
#define RXCPP_OPERATORS_RX_DEBOUNCE_HPP |
auto interval(Duration period) -> typename std::enable_if< detail::defer_interval< Duration, identity_one_worker >::value, typename detail::defer_interval< Duration, identity_one_worker >::observable_type >::type
Definition: rx-interval.hpp:113