2019年11月28日

JavaScript实现sleep休眠等待

摘要: function sleep(time) { return new Promise((resolve) => { setTimeout(() => { resolve(); }, time || 1000); }) } async function test() { console.log(new 阅读全文

posted @ 2019-11-28 10:18 黄道长 阅读(2261) 评论(0) 推荐(0) 编辑

导航