Skip to content

Commit b28dc67

Browse files
committed
fix(wayland) Re-apply the delay timer execution only until the next timer fires up
1 parent 26797eb commit b28dc67

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

main.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,13 @@ static void lv_linux_disp_init(void)
8888
#if LV_USE_WAYLAND == 0
8989
void lv_linux_run_loop(void)
9090
{
91+
uint32_t idle_time;
92+
9193
/*Handle LVGL tasks*/
9294
while(1) {
93-
lv_timer_handler();
94-
usleep(5000);
95+
96+
idle_time = lv_timer_handler(); /*Returns the time to the next timer execution*/
97+
usleep(idle_time * 1000);
9598
}
9699
}
97100
#endif

0 commit comments

Comments
 (0)