Skip to content

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

@phckopper

Description

@phckopper

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

Activity

github-actions

github-actions commented on Jul 15, 2022

@github-actions

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

github-actions

github-actions commented on Jul 30, 2022

@github-actions

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

added 2 commits that reference this issue on Sep 30, 2022
himat

himat commented on Dec 27, 2022

@himat

@s1hofmann is this being prioritized? Just curious

s1hofmann

s1hofmann commented on Dec 27, 2022

@s1hofmann
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @himat@phckopper@s1hofmann

        Issue actions

          Reconsider awaiting on sleep on pressKey/releaseKey when autoDelayMs == 0 · Issue #409 · nut-tree/nut.js