diff options
author | Grigoriy Chudnov <g.chudnov@gmail.com> | 2016-04-21 09:36:27 +0300 |
---|---|---|
committer | Grigoriy Chudnov <g.chudnov@gmail.com> | 2016-04-21 09:36:27 +0300 |
commit | 141f5e043bd28ee50393fdcf3b8831d501e6d5d9 (patch) | |
tree | 91295be030312ea8509865222b59da95b0394d90 /Rx/v2/examples | |
parent | 8fe51e452f711ca4fbb592502640a04c04a29278 (diff) | |
download | RxCpp-141f5e043bd28ee50393fdcf3b8831d501e6d5d9.tar.gz |
fix sample
Diffstat (limited to 'Rx/v2/examples')
-rw-r--r-- | Rx/v2/examples/doxygen/timestamp.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Rx/v2/examples/doxygen/timestamp.cpp b/Rx/v2/examples/doxygen/timestamp.cpp index f17e5c0..1cb0d2e 100644 --- a/Rx/v2/examples/doxygen/timestamp.cpp +++ b/Rx/v2/examples/doxygen/timestamp.cpp @@ -6,13 +6,15 @@ SCENARIO("timestamp sample") { printf("//! [timestamp sample]\n"); + typedef rxcpp::schedulers::scheduler::clock_type::time_point time_point; + using namespace std::chrono; auto values = rxcpp::observable<>::interval(milliseconds(100)) .timestamp() .take(3); values. subscribe( - [](std::pair<long, typename rxsc::scheduler::clock_type::time_point> v) { printf("OnNext: %ld %lld\n", v.first, static_cast<long long>(v.second.time_since_epoch().count())); }, + [](std::pair<long, time_point> v) { printf("OnNext: %ld %lld\n", v.first, static_cast<long long>(v.second.time_since_epoch().count())); }, [](std::exception_ptr ep) { try { std::rethrow_exception(ep); @@ -30,7 +32,7 @@ SCENARIO("timestamp operator syntax sample") { using namespace rxcpp::operators; using namespace std::chrono; - typedef typename rxcpp::schedulers::scheduler::clock_type::time_point time_point; + typedef rxcpp::schedulers::scheduler::clock_type::time_point time_point; printf("//! [timestamp operator syntax sample]\n"); auto values = interval(milliseconds(100)) |