mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-14 04:38:30 -04:00
24 lines
344 B
C++
24 lines
344 B
C++
#include <stdio.h>
|
|
#include <unistd.h>
|
|
#include <time.h>
|
|
#include <sys/time.h>
|
|
|
|
void setup(void);
|
|
void loop(void);
|
|
|
|
struct timeval sketch_start_time;
|
|
|
|
int main(void)
|
|
{
|
|
gettimeofday(&sketch_start_time, NULL);
|
|
setup();
|
|
while (true) {
|
|
struct timespec ts;
|
|
loop();
|
|
ts.tv_sec = 0;
|
|
ts.tv_nsec = 100;
|
|
nanosleep(&ts, NULL);
|
|
}
|
|
return 0;
|
|
}
|