From 63ae4a657090c262ec2751bea421536b898013ca Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 20 Feb 2020 12:14:17 +0100 Subject: [PATCH] add lv_anim_get_delay() --- src/lv_misc/lv_anim.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h index e790819be..315216a94 100644 --- a/src/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -244,6 +244,17 @@ static inline void lv_anim_set_repeat_delay(lv_anim_t * a, uint16_t delay) */ void lv_anim_start(lv_anim_t * a); + +/** + * Get a delay before starting the animation + * @param a pointer to an initialized `lv_anim_t` variable + * @return delay before the animation in milliseconds + */ +static inline int32_t lv_anim_get_delay(lv_anim_t * a) +{ + return -a->act_time; +} + /** * Delete an animation of a variable with a given animator function * @param var pointer to variable