diff --git a/examples/cpp/cp_app.cpp b/examples/cpp/cp_app.cpp index 5733f22..b9f4c9c 100644 --- a/examples/cpp/cp_app.cpp +++ b/examples/cpp/cp_app.cpp @@ -5,7 +5,8 @@ */ #include -#include +#include +#include #include int sample_cp_send_func(void *data, uint8_t *buf, int len) @@ -60,7 +61,7 @@ int main() // your application code. cp.refresh(); - usleep(1000); + std::this_thread::sleep_for(std::chrono::microseconds(10 * 1000)); } return 0; diff --git a/examples/cpp/pd_app.cpp b/examples/cpp/pd_app.cpp index c856d89..14cc283 100644 --- a/examples/cpp/pd_app.cpp +++ b/examples/cpp/pd_app.cpp @@ -5,7 +5,8 @@ */ #include -#include +#include +#include #include int sample_pd_send_func(void *data, uint8_t *buf, int len) @@ -86,7 +87,7 @@ int main() pd.refresh(); // your application code. - usleep(1000); + std::this_thread::sleep_for(std::chrono::microseconds(10 * 1000)); } return 0;