diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-05-06 16:33:10 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-05-06 16:33:10 +0200 |
commit | 286cddccfd9d69f4bc567fc9f00898f06315cd30 (patch) | |
tree | 22ea704d16653483a972d8b16e0c8724c3d28828 /test/lv2.cc | |
parent | a1f4e968563763435027a905be8349cda1974e00 (diff) |
Get rid of unused unistd includes. Change the rest of the sleep calls to c++.
Diffstat (limited to 'test/lv2.cc')
-rw-r--r-- | test/lv2.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/test/lv2.cc b/test/lv2.cc index 78bf342..4fd197e 100644 --- a/test/lv2.cc +++ b/test/lv2.cc @@ -26,7 +26,8 @@ */ #include <cppunit/extensions/HelperMacros.h> -#include <unistd.h> +#include <thread> +#include <chrono> #include <memory.h> #include <stdio.h> #include <arpa/inet.h> @@ -139,7 +140,7 @@ public: // run for 1 samples to trigger kit loading res = h.run(1); CPPUNIT_ASSERT_EQUAL(0, res); - usleep(1000); // wait for kit to get loaded (async), + std::this_thread::sleep_for(std::chrono::milliseconds(1)); // wait for kit to get loaded (async), res = h.run(100); CPPUNIT_ASSERT_EQUAL(0, res); @@ -217,7 +218,7 @@ public: // run for 1 samples to trigger kit loading res = h.run(1); CPPUNIT_ASSERT_EQUAL(0, res); - usleep(1000); // wait for kit to get loaded (async), + std::this_thread::sleep_for(std::chrono::milliseconds(1)); // wait for kit to get loaded (async), seq.addMidiNote(5, 1, 127); res = h.run(100); @@ -307,13 +308,13 @@ public: // run for 1 samples to trigger kit loading res = h.run(1); CPPUNIT_ASSERT_EQUAL(0, res); - sleep(1); // wait for kit to get loaded (async), + std::this_thread::sleep_for(std::chrono::seconds(1)); // wait for kit to get loaded (async), seq.addMidiNote(5, 1, 127); for(int i = 0; i < 10; i++) { res = h.run(10); - usleep(1000); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); CPPUNIT_ASSERT_EQUAL(0, res); //printf("Iteration:\n"); @@ -330,7 +331,7 @@ public: seq.addMidiNote(5, 1, 127); res = h.run(10); - usleep(1000); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); CPPUNIT_ASSERT_EQUAL(0, res); /* |