#include <rpp/rpp.hpp>
#include <iostream>
int main()
{
{
auto start = rpp::schedulers::clock_type::now();
.flat_map([](int v)
{
return rpp::source::just(v)
})
.tap([&](int v)
{
std::cout << "Sent value " << v << " at " << std::chrono::duration_cast<std::chrono::milliseconds>(rpp::schedulers::clock_type::now() - start).count() << std::endl;
})
.subscribe([](int v) { std::cout << "new value " << v << std::endl; },
[]() { std::cout << "completed" << std::endl; });
}
return 0;
}
Schedules execution of schedulables via queueing tasks to the caller thread with priority to time_poi...
Definition: trampoline_scheduler.hpp:41