Returns an observable that emits a sequential integer every specified time interval, on the specified scheduler.
More...
Go to the source code of this file.
|
template<class Duration > |
auto | rxcpp::sources::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 |
| Returns an observable that emits a sequential integer every specified time interval, on the specified scheduler. More...
|
|
template<class Coordination > |
auto | rxcpp::sources::interval (rxsc::scheduler::clock_type::duration period, Coordination cn) -> typename std::enable_if< detail::defer_interval< rxsc::scheduler::clock_type::duration, Coordination >::value, typename detail::defer_interval< rxsc::scheduler::clock_type::duration, Coordination >::observable_type >::type |
| Returns an observable that emits a sequential integer every specified time interval, on the specified scheduler. More...
|
|
template<class Duration > |
auto | rxcpp::sources::interval (rxsc::scheduler::clock_type::time_point when, 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 |
| Returns an observable that emits a sequential integer every specified time interval, on the specified scheduler. More...
|
|
template<class Coordination > |
auto | rxcpp::sources::interval (rxsc::scheduler::clock_type::time_point when, rxsc::scheduler::clock_type::duration period, Coordination cn) -> typename std::enable_if< detail::defer_interval< rxsc::scheduler::clock_type::duration, Coordination >::value, typename detail::defer_interval< rxsc::scheduler::clock_type::duration, Coordination >::observable_type >::type |
| Returns an observable that emits a sequential integer every specified time interval, on the specified scheduler. More...
|
|
Returns an observable that emits a sequential integer every specified time interval, on the specified scheduler.
- Template Parameters
-
Coordination | the type of the scheduler (optional) |
- Parameters
-
period | period between emitted values |
cn | the scheduler to use for scheduling the items (optional) |
- Returns
- Observable that sends a sequential integer each time interval
- Sample Code
auto start = std::chrono::steady_clock::now() + std::chrono::milliseconds(1);
auto period = std::chrono::milliseconds(1);
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnCompleted
- Sample Code
auto period = std::chrono::milliseconds(1);
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnCompleted
- Sample Code
auto start = scheduler.now() + std::chrono::milliseconds(1);
auto period = std::chrono::milliseconds(1);
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnCompleted
- Sample Code
auto period = std::chrono::milliseconds(1);
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnCompleted
#define RXCPP_SOURCES_RX_INTERVAL_HPP |