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

[JENKINS-72157] ensure uptime is independent of system clock #8771

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

mawinter69
Copy link
Contributor

@mawinter69 mawinter69 commented Dec 11, 2023

use nanoTime to compute time delta.

See JENKINS-72157.

Testing done

  • start Jenkins check uptime via script console
  • change system time
  • verify uptime is still correct

Proposed changelog entries

Proposed upgrade guidelines

N/A

Submitter checklist

Desired reviewers

@mention

Before the changes are marked as ready-for-merge:

Maintainer checklist

Copy link
Member

@daniel-beck daniel-beck left a comment

Choose a reason for hiding this comment

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

Thanks!

Could be used to simplify/make consistent https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/jenkins/telemetry/impl/Uptime.java but that seems unnecessary (and would technically change the start time definition).

@NotMyFault NotMyFault added the rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Dec 12, 2023
Copy link
Member

@NotMyFault NotMyFault left a comment

Choose a reason for hiding this comment

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

/label ready-for-merge


This PR is now ready for merge. We will merge it after ~24 hours if there is no negative feedback.
Please see the merge process documentation for more information about the merge process.
Thanks!

@comment-ops-bot comment-ops-bot bot added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Dec 12, 2023
@NotMyFault NotMyFault merged commit 0a7ab5f into jenkinsci:master Dec 13, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants