Skip to content

[Windows] WaitUntil timer inaccurate #2005

@msiglreith

Description

@msiglreith

Using WaitUntil on Windows may be very inaccurate due to the scheduler time resolution which is by default several ms, currently we just assume 1ms. For real-time applications this leads to laggy behavior when using it for frame timing, usually waking up only with few ms delay.

One option would be to use timeBeginPeriod/timeEndPeriod to dynamically decrease the timer to a better resolution and spin wait the rest of the time. Drawback here is that it may affect battery lifetime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions