use nanosleep() instead of usleep()

This commit is contained in:
Andrew Tridgell 2011-10-09 21:22:10 +11:00
parent eebd632967
commit 034755e432

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