# Refreshing (/main-modules/display/refreshing)



Default Refresh Behavior [#default-refresh-behavior]

Normally the dirty (a.k.a invalid) areas are checked and redrawn in
every <ApiLink name="LV_DEF_REFR_PERIOD" /> milliseconds (set in `lv_conf.h`).
This happens as a result of a refresh [Timer (lv\_timer)](/main-modules/timer) created that gets created when
the display is created, and is executed at that interval.

Decoupling the Display Refresh Timer [#decoupling-the-display-refresh-timer]

However, in some cases you might need more control on when display
refreshing happens, for example:

* to synchronize rendering with VSYNC or the TE signal;
* to time display refreshes immediately after a single screen update of all widgets
  that needed to have their display data updated (i.e. only updated once immediately
  before display refresh to reduce CPU overhead).

You can do this in the following way:

```c title=" " lineNumbers=1
/* Delete original display refresh timer */
lv_display_delete_refr_timer(display1);

/* Call this to refresh dirty (changed) areas of the display. */
lv_display_refr_timer(NULL);
```

If you have multiple displays call <ApiLink name="lv_display_set_default" display="lv_display_set_default(display1)" /> to
select the display to refresh before <ApiLink name="lv_display_refr_timer" display="lv_display_refr_timer(NULL)" />.

If the performance monitor is enabled, the value of <ApiLink name="LV_DEF_REFR_PERIOD" /> needs to be set
to match the refresh period of the display to ensure that the statistical results are correct.

Forcing a Refresh [#forcing-a-refresh]

Normally the invalidated areas (marked for redrawing) are rendered in
<ApiLink name="lv_timer_handler" /> in every <ApiLink name="LV_DEF_REFR_PERIOD" /> milliseconds.
However, by using <ApiLink name="lv_refr_now" display="lv_refr_now(display)" /> you can tell LVGL to redraw the
invalid areas immediately. The refreshing will happen in <ApiLink name="lv_refr_now" />
which might take longer.

The parameter of <ApiLink name="lv_refr_now" /> is a pointer to the display to refresh.  If
`NULL` is passed, all displays that have active refresh timers will be refreshed.

API [#api]
