1```eval_rst
2.. include:: /header.rst
3:github_url: |github_link_base|/porting/task-handler.md
4```
5# Task Handler
6
7To handle the tasks of LVGL you need to call `lv_timer_handler()` periodically in one of the following:
8- *while(1)* of *main()* function
9- timer interrupt periodically (lower priority than `lv_tick_inc()`)
10- an OS task periodically
11
12The timing is not critical but it should be about 5 milliseconds to keep the system responsive.
13
14Example:
15```c
16while(1) {
17  lv_timer_handler();
18  my_delay_ms(5);
19}
20```
21
22To learn more about timers visit the [Timer](/overview/timer) section.
23
24