登录后复制 import { setTimeout } from 'node:timers/promises' const fn = async () => { await setTimeout(1000) console.log(`Tick ${Date.now()}`); } while (true) { await fn() } 1.2.3.4.5.6.7.8.9.10. 原创作者: u_12836588 转载于: https://blog.51cto.com/u_12836588/11651407