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
    111 months ago

    I tried it in about:blank but it does the same. Maybe there is some extension in my browser that slows it down (somehow). Im running tampermonkey but it’s not active on any pages I tried this on.

    I ran the script in nodejs and everything works perfectly, the sleep time is very close to the original value so it’s definitely something inside browser that causes it to lag.