| | |
| | | #include "util.h" |
| | | #include <atomic> |
| | | |
| | | using namespace bhome::msg; |
| | | using namespace bhome_msg; |
| | | |
| | | namespace |
| | | { |
| | |
| | | const int proc_id_len, |
| | | const void *data, |
| | | const int data_len, |
| | | BHServerCallbackTag *tag) |
| | | const void *tag) |
| | | { |
| | | // printf("ServerProc: "); |
| | | // DEFER1(printf("\n");); |
| | |
| | | } |
| | | } |
| | | |
| | | namespace |
| | | { |
| | | struct CCC { |
| | | }; |
| | | void F(CCC &&c) {} |
| | | |
| | | template <class... T> |
| | | void Pass(T &&...t) |
| | | { |
| | | F(std::forward<decltype(t)>(t)...); |
| | | } |
| | | |
| | | } // namespace |
| | | BOOST_AUTO_TEST_CASE(ApiTest) |
| | | { |
| | | auto max_time = std::chrono::steady_clock::time_point::max(); |
| | |
| | | auto hb = [](std::atomic<bool> *run) { |
| | | while (*run) { |
| | | Sleep(1s, false); |
| | | bool r = BHHeartBeatEasy(1000); |
| | | bool r = BHHeartbeatEasy(1000); |
| | | printf("heartbeat: %s\n", r ? "ok" : "failed"); |
| | | } |
| | | }; |