Return an observable that emits observables every period time interval and collects items from this observable for period of time into each produced observable, on the specified scheduler. If the skip parameter is set, return an observable that emits observables every skip time interval and collects items from this observable for period of time into each produced observable, on the specified scheduler.
More...
Go to the source code of this file.
|
template<class... AN> |
auto | rxcpp::operators::window_with_time (AN &&...an) -> operator_factory< window_with_time_tag, AN... > |
| Return an observable that emits observables every period time interval and collects items from this observable for period of time into each produced observable, on the specified scheduler. If the skip parameter is set, return an observable that emits observables every skip time interval and collects items from this observable for period of time into each produced observable, on the specified scheduler. More...
|
|
Return an observable that emits observables every period time interval and collects items from this observable for period of time into each produced observable, on the specified scheduler. If the skip parameter is set, return an observable that emits observables every skip time interval and collects items from this observable for period of time into each produced observable, on the specified scheduler.
- Template Parameters
-
Duration | the type of time intervals. |
Coordination | the type of the scheduler (optional). |
- Parameters
-
period | the period of time each window collects items before it is completed. |
skip | the period of time after which a new window will be created. |
coordination | the scheduler for the windows (optional). |
- Returns
- Observable that emits observables every period time interval and collect items from this observable for period of time into each produced observable. If the skip parameter is set, return an Observable that emits observables every skip time interval and collect items from this observable for period of time into each produced observable.
- Sample Code
int counter = 0;
auto period = std::chrono::milliseconds(4);
auto skip = std::chrono::milliseconds(6);
values.
int id = counter++;
printf("[window %d] Create window\n", id);
[id](long v){printf("[window %d] OnNext: %ld\n", id, v);},
[id](){printf("[window %d] OnCompleted\n", id);});
});
- Sample Code
int counter = 0;
auto period = std::chrono::milliseconds(4);
auto skip = std::chrono::milliseconds(6);
values.
int id = counter++;
printf("[window %d] Create window\n", id);
[id](long v){printf("[window %d] OnNext: %ld\n", id, v);},
[id](){printf("[window %d] OnCompleted\n", id);});
});
- Sample Code
int counter = 0;
values.
int id = counter++;
printf("[window %d] Create window\n", id);
[id](long v){printf("[window %d] OnNext: %ld\n", id, v);},
[id](){printf("[window %d] OnCompleted\n", id);});
});
- Sample Code
int counter = 0;
values.
int id = counter++;
printf("[window %d] Create window\n", id);
[id](long v){printf("[window %d] OnNext: %ld\n", id, v);},
[id](){printf("[window %d] OnCompleted\n", id);});
});
#define RXCPP_OPERATORS_RX_WINDOW_WITH_TIME_HPP |