Skip to content

Instant::now can go backward #56612

Closed
Closed
@goffrie

Description

@goffrie

As in #51648 (comment).

I've seen "specified instant was later than self" panics in the wild, in particular on Windows (32-bit x86). Googling reveals stuff like https://stackoverflow.com/questions/44020619/queryperformancecounter-on-multi-core-processor-under-windows-10-behaves-erratic which suggests that QueryPerformanceCounter can't really be relied on... frustratingly.

Perhaps libstd should work around this and enforce that Instant::now() never go backward (with an atomic global, or something?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-windowsOperating system: Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions