mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 10:28:29 -04:00
use nanosleep() instead of usleep()
This commit is contained in:
parent
41d734846e
commit
95475c6221
@ -13,8 +13,11 @@ int main(void)
|
||||
gettimeofday(&sketch_start_time, NULL);
|
||||
setup();
|
||||
while (true) {
|
||||
struct timespec ts;
|
||||
loop();
|
||||
usleep(10);
|
||||
ts.tv_sec = 0;
|
||||
ts.tv_nsec = 100;
|
||||
nanosleep(&ts, NULL);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user