Skip to content

Wait-Event should allow more granularity #19704

@StartAutomating

Description

@StartAutomating

Summary of the new feature / enhancement

As a user of PowerShell events, I often find myself frustrated with the ways Wait-Event works.

Primarily this concerns the Timeout being in seconds.

That may seem like a little thing, but it has a major downside: when I'm expecting events to be quick, this makes me wait a whole second I may not need to wait.

Additionally, based off of the way the command is written, the shortest possible wait is 1/5th of a second.

Proposed technical implementation details (optional)

Wait-Event should have a -Timespan parameter that takes a particular Timespan.

Most of the internal logic should remain the same, with the exception of modifying the "floor" value, which is currently 200ms.

The floor value should instead be one tenth of the timeout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    In-PRIndicates that a PR is out for the issueIssue-Enhancementthe issue is more of a feature request than a bugUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions