Skip to content
Snippets Groups Projects

use OS sleep instead of polling to reduce CPU usage

Merged Imported Administrator requested to merge pr-os-sleep into master
2 files
+ 4
2
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 2
1
@@ -284,7 +284,8 @@ int main(int argc, char *argv[]) {
/* Periodically run timer / task handler */
while(1) {
lv_timer_periodic_handler();
uint32_t time_till_next = lv_timer_handler();
usleep(time_till_next * 1000);
}
return 0;
Loading