Skip to content

Commit

Permalink
Increase responsibility
Browse files Browse the repository at this point in the history
  • Loading branch information
gdyuldin committed Sep 30, 2024
1 parent c93de29 commit bf9f385
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,14 @@ int main(void) {
lv_scr_load(main_obj);
#endif

int64_t next_loop_time, sleep_time;
while (1) {
lv_timer_handler();
next_loop_time = get_time() + lv_timer_handler();
event_obj_check();
usleep(5 * 1000);
sleep_time = next_loop_time - get_time();
if (sleep_time > 0) {
usleep(sleep_time * 1000);
}
}
return 0;
}
Expand Down

0 comments on commit bf9f385

Please sign in to comment.