mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 10:28:29 -04:00
desktop: use a bit less CPU
This commit is contained in:
parent
5cf3e92a22
commit
8c8ad0cd55
@ -1,4 +1,5 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
@ -11,6 +12,9 @@ int main(void)
|
|||||||
{
|
{
|
||||||
gettimeofday(&sketch_start_time, NULL);
|
gettimeofday(&sketch_start_time, NULL);
|
||||||
setup();
|
setup();
|
||||||
while (true) loop();
|
while (true) {
|
||||||
|
loop();
|
||||||
|
usleep(10);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user