use nanosleep() instead of usleep()

This commit is contained in:
Andrew Tridgell 2011-10-09 21:22:10 +11:00
parent 41d734846e
commit 95475c6221

View File

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