/* Find out how much time remains before a timer must be run.  */
static uint32_t lv_timer_time_remaining(lv_timer_t *timer)
/* Find out how much time remains before a timer must be run.  */
static uint32_t lv_timer_time_remaining(lv_timer_t *timer)
{
    uint32_t elp = lv_tick_elaps(timer->last_run);
    if(elp >= timer->period)
        return 0;
    return timer->period - elp;
}