summaryrefslogtreecommitdiff
path: root/test/enginetest.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-05-06 16:33:10 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2017-05-06 16:33:10 +0200
commit286cddccfd9d69f4bc567fc9f00898f06315cd30 (patch)
tree22ea704d16653483a972d8b16e0c8724c3d28828 /test/enginetest.cc
parenta1f4e968563763435027a905be8349cda1974e00 (diff)
Get rid of unused unistd includes. Change the rest of the sleep calls to c++.
Diffstat (limited to 'test/enginetest.cc')
-rw-r--r--test/enginetest.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/enginetest.cc b/test/enginetest.cc
index 5e33fe2..ad4315d 100644
--- a/test/enginetest.cc
+++ b/test/enginetest.cc
@@ -26,8 +26,10 @@
*/
#include <cppunit/extensions/HelperMacros.h>
+#include <thread>
+#include <chrono>
+
#include <drumgizmo.h>
-#include <unistd.h>
#include "drumkit_creator.h"
@@ -100,18 +102,18 @@ public:
for(int i = 0; i < 100; ++i)
{
settings.drumkit_file.store(kit1_file);
- usleep(100);
+ std::this_thread::sleep_for(std::chrono::microseconds(100));
settings.drumkit_file.store(kit2_file);
- usleep(100);
+ std::this_thread::sleep_for(std::chrono::microseconds(100));
}
// Switch kits with bigger delay giving the loader time to finish
for(int i = 0; i < 100; ++i)
{
settings.drumkit_file.store(kit1_file);
- usleep(10000);
+ std::this_thread::sleep_for(std::chrono::milliseconds(10));
settings.drumkit_file.store(kit2_file);
- usleep(10000);
+ std::this_thread::sleep_for(std::chrono::milliseconds(10));
}
}
};