Replace sleep with px4_sleep

This is another step to isolate time from the system.
This commit is contained in:
Julian Oes
2018-12-22 10:32:18 +01:00
parent 3f695870a4
commit d70b0f1c8c
13 changed files with 20 additions and 15 deletions
+2 -2
View File
@@ -71,7 +71,7 @@ static int writer_main(int argc, char *argv[])
while (!g_exit) {
// Wait for 2 seconds
PX4_INFO("Writer: Sleeping for 2 sec");
ret = sleep(2);
ret = px4_sleep(2);
if (ret < 0) {
PX4_INFO("Writer: sleep failed %d %d", ret, errno);
@@ -326,6 +326,6 @@ fail2:
g_exit = true;
px4_close(fd);
PX4_INFO("TEST: waiting for writer to stop");
sleep(3);
px4_sleep(3);
return ret;
}