Js event loop: How can I do someting after the IO finished?

前端 未结 0 1421
轻奢々
轻奢々 2020-12-12 22:48

I have a sleep function to simulate some actions spending much time.

function sleep(ms) {
    const startTime = new Date;
    while (new Date - startTime <         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题