Home | History | Annotate | Download | only in doxygen
      1 #include "rxcpp/rx.hpp"
      2 
      3 #include "rxcpp/rx-test.hpp"
      4 #include "catch.hpp"
      5 
      6 SCENARIO("sample period sample") {
      7     printf("//! [sample period sample]\n");
      8     auto values = rxcpp::observable<>::interval(std::chrono::milliseconds(2)).
      9         take(7).
     10         sample_with_time(std::chrono::milliseconds(4));
     11     values.
     12         subscribe(
     13             [](long v) {
     14                 printf("OnNext: %ld\n", v);
     15             },
     16             []() { printf("OnCompleted\n"); });
     17     printf("//! [sample period sample]\n");
     18 }
     19