/* Get elapsed time since last user activity on a display (e.g. click)  */
uint32_t lv_disp_get_inactive_time(const lv_disp_t *disp)
/* Get elapsed time since last user activity on a display (e.g. click)  */
uint32_t lv_disp_get_inactive_time(const lv_disp_t *disp)
{
    if(!disp) disp = lv_disp_get_default();
    if(!disp) {
        LV_LOG_WARN("lv_disp_get_inactive_time: no display registered");
        return 0;
    }
    if(disp) return lv_tick_elaps(disp->last_activity_time);
    lv_disp_t * d;
    uint32_t t = UINT32_MAX;
    d          = lv_disp_get_next(NULL);
    while(d) {
        t = LV_MATH_MIN(t, lv_tick_elaps(d->last_activity_time));
        d = lv_disp_get_next(d);
    }
    return t;
}