1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0

This commit is contained in:
Gabor Kiss-Vamosi 2020-02-28 13:10:25 +01:00
commit f25633f60f

View File

@ -256,8 +256,10 @@ void lv_disp_refr_task(lv_task_t * task)
static uint32_t perf_last_time = 0;
static uint32_t elaps_max = 1;
if(lv_tick_elaps(perf_last_time) > 300) {
if(lv_tick_elaps(perf_last_time) < 300) {
elaps_max = LV_MATH_MAX(elaps, elaps_max);
/*Just refresh the label to always have something to monitor*/
lv_label_set_text(perf_label, NULL);
} else {
perf_last_time = lv_tick_get();
uint32_t fps = 1000 / (elaps_max == 0 ? 1 : elaps_max);