Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNG-8533] [MNG-5729] Use monotonic time measurements #1965

Merged
merged 12 commits into from
Dec 12, 2024

Conversation

gnodet
Copy link
Contributor

@gnodet gnodet commented Dec 11, 2024

JIRA issue: MNG-8533

This PR introduces a MonotonicClock in the Maven API.
It provides accurate duration computation, and relative date/time support, leveragingSystem.nanoTime().
The clock is UTC-based and provided Instant need to be zoned if needed for correct display.


https://issues.apache.org/jira/browse/MNG-5729

@gnodet gnodet requested a review from michael-o December 11, 2024 14:35
@cstamas
Copy link
Member

cstamas commented Dec 11, 2024

Is this for rc2 or 4.1?

@gnodet gnodet added this to the 4.1.0 milestone Dec 11, 2024
@gnodet
Copy link
Contributor Author

gnodet commented Dec 12, 2024

Is this for rc2 or 4.1?

I'm on the edge. The updated PR is more lightweight and does not define a new Temporal implementation, but simply reuses the well known Instant instead, but provides a Clock implementation which uses the monotonic system clock. This makes the code a lot simpler and safer.

@cstamas
Copy link
Member

cstamas commented Dec 12, 2024

This PR looks quite non-invasive, so I'd just merge it, make it rc2

@gnodet gnodet modified the milestones: 4.1.0, 4.0.0-rc-2 Dec 12, 2024
@gnodet gnodet merged commit 54ffc50 into apache:master Dec 12, 2024
13 checks passed
@gnodet gnodet deleted the monotonic-time branch December 13, 2024 13:07
@gnodet gnodet changed the title [MNG-5729] Use monotonic time measurements [MNG-8533] [MNG-5729] Use monotonic time measurements Jan 20, 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