diff --git a/docs/en/uiflow/introduction.md b/docs/en/uiflow/introduction.md index 377c49c3..14a711ea 100644 --- a/docs/en/uiflow/introduction.md +++ b/docs/en/uiflow/introduction.md @@ -187,4 +187,32 @@ Get current system run time. >Add the Wait Block to the program that needs to be delayed and set the time. When the program executes to it, it will play a delay. -> \ No newline at end of file +> + + +# Timer +_____________________________ + +#### Function Description + +>Timer is a timer function that can be run into the program block periodically. + +> + +* __Timer callback__ +Timer callback function, executed regularly + +* __Start period ms mode__ +The timer is started to run at the specified time interval. There are two setting modes, One_shot is executed once, and periodic is executed periodically. + +* __Set period ms mode__ +Modify the time parameter and running mode of the specified timer. + +* __Stop__ +Stop timer. + +#### Usage + +>Add two timers, count separately according to time parameters. + +> diff --git a/docs/image/Program_structure/Timer.png b/docs/image/Program_structure/Timer.png new file mode 100644 index 00000000..9b310e36 Binary files /dev/null and b/docs/image/Program_structure/Timer.png differ diff --git a/docs/image/Program_structure/Timer_user.gif b/docs/image/Program_structure/Timer_user.gif new file mode 100644 index 00000000..5f42a777 Binary files /dev/null and b/docs/image/Program_structure/Timer_user.gif differ diff --git a/docs/zh_CN/uiflow/introduction.md b/docs/zh_CN/uiflow/introduction.md index 93c2d35f..ff32d1f3 100644 --- a/docs/zh_CN/uiflow/introduction.md +++ b/docs/zh_CN/uiflow/introduction.md @@ -181,4 +181,34 @@ _____________________________ >将Wait Block添加到需要延时的程序之间并设定时间,在程序执行到它时,就会发挥延时作用 -> \ No newline at end of file +> + + +# Timer +_____________________________ + +#### 功能说明 + +>Timer是一个定时器函数,可以定期进入程序块运行 + +> + +* __Timer callback__ +定时器回调函数,定期执行 + +* __Start period ms mode__ +开启定时器以指定的时间间隔运行,设置模式有两种,One_shot为执行一次,periodic为周期执行 + +* __Set period ms mode__ +修改指定定时器的时间参数和运行模式 + +* __Stop__ +终止定时器 + +#### 使用方法 + +>添加两个定时器,依据时间参数分别计数 + +> + +