Skip to content

OS clocks may not be monotonically increasing. #6111

@yurapyon

Description

@yurapyon

Hi!
Looking at the Rust source for Instant::now() link, it seems that on some operating systems and hardware, the system clock may not be guaranteed to be monotonically increasing.

I noticed Zig's Timer doesn't account for this. Rust goes for a global mutex as the answer, but this seems more fitting for an atomic?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSolving this issue will likely involve adding new logic or components to the codebase.standard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions