-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
OS clocks may not be monotonically increasing. #6111
Copy link
Copy link
Open
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Milestone
Metadata
Metadata
Assignees
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
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?