nut-tree / nut.js

Native UI testing / controlling with node
https://nutjs.dev
2.27k stars 129 forks source link

Reconsider awaiting on sleep on pressKey/releaseKey when autoDelayMs == 0 #409

Open phckopper opened 2 years ago

phckopper commented 2 years ago

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

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 2 years ago

This issue was closed because it has been inactive for 14 days since being marked as stale.

himat commented 1 year ago

@s1hofmann is this being prioritized? Just curious

s1hofmann commented 1 year ago

@himat It's not my top priority at the moment.