Short overview
When calling pressKey/releaseKey, the sleep function is awaited no matter the delay set in autoDelayMs. However, due to the way sleep is implemented, using a setTimeout, a non-negligible delay is introduced nonetheless, and there are no guarantees on its upper bound.
Therefore, I propose that a special case is added to handle a delay of 0, so that applications that require low latency can run as fast as possible.
Use case
- Low-latency applications
- Interactive experiences
- Video-game automation
Short overview
When calling
pressKey/releaseKey, thesleepfunction is awaited no matter the delay set inautoDelayMs. However, due to the waysleepis implemented, using asetTimeout, a non-negligible delay is introduced nonetheless, and there are no guarantees on its upper bound.Therefore, I propose that a special case is added to handle a delay of 0, so that applications that require low latency can run as fast as possible.
Use case