Skip to content

Conversation

denizzzka
Copy link
Contributor

@denizzzka denizzzka commented Sep 8, 2025

I think it's worth adding ability to use of monotonous clocks to create UUIDs

At least, timestampRandomUUID() should use monotonic clock as recommended by IETF

@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @denizzzka! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#10857"

@denizzzka denizzzka force-pushed the v7_mono branch 2 times, most recently from 4402078 to f99fec7 Compare September 8, 2025 11:04
@denizzzka denizzzka changed the title UUIDv7: ctor accepts MonoTime as recommentded by IETF UUIDv7: ctor accepts MonoTime as recommended by IETF Sep 8, 2025
@denizzzka
Copy link
Contributor Author

Silly idea: monotonic time is not tied to specific points in time, so it is not suitable for calculating absolute timestamps by itself

@denizzzka denizzzka closed this Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants