Browse Source

desktop: use a bit less CPU

master
Andrew Tridgell 14 years ago
parent
commit
8c8ad0cd55
  1. 6
      libraries/Desktop/support/main.cpp

6
libraries/Desktop/support/main.cpp

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include <stdio.h>
#include <unistd.h>
#include <time.h>
#include <sys/time.h>
@ -11,6 +12,9 @@ int main(void) @@ -11,6 +12,9 @@ int main(void)
{
gettimeofday(&sketch_start_time, NULL);
setup();
while (true) loop();
while (true) {
loop();
usleep(10);
}
return 0;
}

Loading…
Cancel
Save