mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-18 00:40:35 +08:00
Replace sleep with px4_sleep
This is another step to isolate time from the system.
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
*/
|
||||
|
||||
#include "hello_example.h"
|
||||
|
||||
#include <px4_time.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -53,7 +53,7 @@ int HelloExample::main()
|
||||
int i = 0;
|
||||
|
||||
while (!appState.exitRequested() && i < 5) {
|
||||
sleep(2);
|
||||
px4_sleep(2);
|
||||
|
||||
printf(" Doing work...\n");
|
||||
++i;
|
||||
|
||||
Reference in New Issue
Block a user