Browse Source

use nanosleep() instead of usleep()

master
Andrew Tridgell 14 years ago
parent
commit
034755e432
  1. 5
      libraries/Desktop/support/main.cpp

5
libraries/Desktop/support/main.cpp

@ -13,8 +13,11 @@ int main(void) @@ -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;
}

Loading…
Cancel
Save