You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

23 lines
344 B

#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;
}