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

Use monotonic time for measuring time internally #4154

Merged
merged 1 commit into from May 12, 2023
Merged

Conversation

wallyqs
Copy link
Member

@wallyqs wallyqs commented May 12, 2023

  • Branch rebased on top of current main (git pull --rebase origin main)
  • Changes squashed to a single commit (described here)
  • Build is green in Travis CI
  • You have certified that the contribution is your original work and that you license the work to the project under the Apache 2 license

Signed-off-by: Waldemar Quevedo <wally@nats.io>
@wallyqs wallyqs marked this pull request as ready for review May 12, 2023 15:32
@wallyqs wallyqs requested a review from a team as a code owner May 12, 2023 15:32
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was @ripienaar who wanted all times in UTC?

If this is internal only I think we are good, but want to make sure if we surface any of these externally they are UTC.

@ripienaar
Copy link
Contributor

Yes APIs responding in UTC is best. This light even be considered a breaking change?

@wallyqs
Copy link
Member Author

wallyqs commented May 12, 2023

All these should not be front facing, they are used for the internal timers like ping interval etc... which if you call UTC then switch to being in wall clock mode so prone to clock skews.

@ripienaar
Copy link
Contributor

Ah all right then it’s fine. Sorry was just going off Derek’s comment (on my phone, code review hard)

@derekcollison derekcollison self-requested a review May 12, 2023 19:36
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derekcollison derekcollison merged commit fc64c61 into main May 12, 2023
2 checks passed
@derekcollison derekcollison deleted the utc-fixes branch May 12, 2023 19:37
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.

None yet

3 participants