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

remove the notion of Clock #684

Merged
merged 1 commit into from
Jul 25, 2022
Merged

remove the notion of Clock #684

merged 1 commit into from
Jul 25, 2022

Conversation

Ladicek
Copy link
Contributor

@Ladicek Ladicek commented Jul 25, 2022

The Clock abstraction was introduced to support rate limit, but is
in fact unnecessary and can be replaced by the existing Stopwatch
abstraction. This has an additional advantage: the SystemStopwatch
implementation uses System.nanoTime() and hence is monotonic, while
SystemClock used System.currentTimeMillis() and so was not.

The `Clock` abstraction was introduced to support rate limit, but is
in fact unnecessary and can be replaced by the existing `Stopwatch`
abstraction. This has an additional advantage: the `SystemStopwatch`
implementation uses `System.nanoTime()` and hence is monotonic, while
`SystemClock` used `System.currentTimeMillis()` and so was not.
@Ladicek Ladicek added this to the 5.6.0 milestone Jul 25, 2022
@Ladicek Ladicek merged commit e2a3b24 into smallrye:main Jul 25, 2022
@Ladicek Ladicek deleted the remove-clock branch July 25, 2022 14:05
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.

1 participant