Hi, I need to create a infinite (but breakable) cycle where I can slow down the cycle by awaiting promises inside. While cycle should be able to do this, but as you can see in the image, the duration is all over the place.

Why is this happening? Is there a way to make it close to the original sleep duration?

    • charolastra
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      1 year ago

      This talk explains everything I had always wondered about concurrency in JS, but could never be bothered to read about.