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?

  • iFarmGolemsOP
    link
    English
    11 year ago

    I said all over the place because I’ve seen numbers like 1.7 seconds, 2.8 seconds and so on. But it does mostly land on integer multiples.

    Anyway, tried to run this in nodejs and it works as expected - so the conclusion is that it’s somehow a limitation in browser engine (V8 in this case)