Monotonic time systems typically clamp OS-provided timestamps to prevent non-monotonic behavior in edge cases. By incrementing the last timestamp by one nanosecond instead of just clamping, you can enforce strictly monotonic time where each call returns a unique value. This enables stronger assertions and eliminates ambiguity

2m read timeFrom matklad.github.io
Post cover image

Sort: