当前位置:网站首页>Seconds understand the delay and timing function of wechat applet
Seconds understand the delay and timing function of wechat applet
2022-07-07 02:03:00 【Full stack o-jay】
The time delay function , Print once in two seconds “hello”.
setTimeout(()=>
{
console.log("hello");
}, 2*1000);
Timing function , Print every two seconds “hello”.
setInterval(()=>
{
console.log("hello");
}, 2*1000);
If you want to Cancel timing function , be
var k = setInterval(()=>
{
console.log("hello");
}, 2*1000);
clearInterval(k);
The above function can cancel the timer ,k It's a timer id.
边栏推荐
- 2022 system integration project management engineer examination knowledge point: Mobile Internet
- NPM install compilation times "cannot read properties of null (reading 'pickalgorithm')“
- Baidu flying general BMN timing action positioning framework | data preparation and training guide (Part 2)
- 百度飞将BMN时序动作定位框架 | 数据准备与训练指南 (上)
- AcWing 361. Sightseeing cow problem solution (SPFA seeking positive ring)
- Can't you understand the code of linked list in C language? An article allows you to grasp the secondary pointer and deeply understand the various forms of parameter passing in the function parameter
- Flir Blackfly S 工业相机:通过外部触发实现多摄像头同步拍摄
- 将截断字符串或二进制数据
- centos8安裝mysql報錯:The GPG keys listed for the “MySQL 8.0 Community Server“ repository are already ins
- C语言【23道】经典面试题【下】
猜你喜欢
一片叶子两三万?植物消费爆火背后的“阳谋”
New job insights ~ leave the old and welcome the new~
【唯一】的“万字配图“ | 讲透【链式存储结构】是什么?
ROS学习(22)TF变换
猫猫回收站
Flir Blackfly S 工业相机:配置多个摄像头进行同步拍摄
Modify the system time of Px4 flight control
Flir Blackfly S 工业相机 介绍
UC伯克利助理教授Jacob Steinhardt预测AI基准性能:AI在数学等领域的进展比预想要快,但鲁棒性基准性能进展较慢
Flir Blackfly S 工业相机:通过外部触发实现多摄像头同步拍摄
随机推荐
ROS学习(十九)机器人SLAM功能包——cartographer
Right mouse button customization
Vingt - trois mille feuilles? "Yang mou" derrière l'explosion de la consommation végétale
ZOJ problem set – 2563 long dominoes [e.g. pressure DP]
The GPG keys listed for the "MySQL 8.0 community server" repository are already ins
Compile command line terminal swift
AcWing 345. Cattle station solution (nature and multiplication of Floyd)
Basic introduction and use of dvajs
The cradle of eternity
将截断字符串或二进制数据
Flir Blackfly S 工业相机:自动曝光配置及代码
BigDecimal 的正确使用方式
Blue Bridge Cup 2022 13th provincial competition real topic - block painting
HDU 4661 message passing (wood DP & amp; Combinatorics)
Errors made in the development of merging the quantity of data in the set according to attributes
Centros 8 installation MySQL Error: The gpg Keys listed for the "MySQL 8.0 Community Server" repository are already ins
RC振荡器和晶体振荡器简介
糊涂工具类(hutool)post请求设置body参数为json数据
AcWing 346. Solution to the problem of water splashing festival in the corridor (deduction formula, minimum spanning tree)
FLIR blackfly s industrial camera: configure multiple cameras for synchronous shooting