Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Apr 3, 2023

GetTimeMillis has multiple issues:

  • It doesn't denote the underlying clock type
  • It isn't type-safe
  • It is used incorrectly in places that should use a steady clock

Fix all issues here.

@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 3, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK willcl-ark, martinus
Concept ACK dergoegge, fanquake, RandyMcMillan

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

No conflicts as of last run.

@dergoegge
Copy link
Member

Concept ACK

@maflcko maflcko changed the title Use steady clock instead of system clock to measure durations util: Use steady clock instead of system clock to measure durations Apr 3, 2023
@maflcko maflcko force-pushed the 2304-steady-over-millis- branch from fa069d8 to ffff99d Compare April 3, 2023 12:59
Copy link
Contributor

@martinus martinus left a comment

Choose a reason for hiding this comment

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

Concept ACK

@fanquake
Copy link
Member

fanquake commented Apr 4, 2023

Concept ACK

@willcl-ark
Copy link
Member

ACK fa83fb3

This is a nice cleanup to the clocks.

There are a few time values left as other types in the codebase, but it doesn't make sense to change them as they are being used as those types by other components (mainly libevent it seems).

@DrahtBot DrahtBot removed the request for review from willcl-ark May 5, 2023 09:42
@RandyMcMillan
Copy link
Contributor

Concept ACK

@fanquake fanquake requested a review from martinus May 5, 2023 16:16
@DrahtBot DrahtBot removed the request for review from martinus May 5, 2023 18:31
Copy link
Contributor

@martinus martinus left a comment

Choose a reason for hiding this comment

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

Code review ACK fa83fb3, also ran all tests. All usages of the steady_clock are just for duration measurements, so the change to a different epoch is ok.

@fanquake fanquake merged commit e460c0a into bitcoin:master May 6, 2023
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request May 7, 2023
@maflcko maflcko deleted the 2304-steady-over-millis- branch May 8, 2023 07:04
kwvg added a commit to kwvg/dash that referenced this pull request Jul 19, 2023
kwvg added a commit to kwvg/dash that referenced this pull request Jul 19, 2023
kwvg added a commit to kwvg/dash that referenced this pull request Jul 23, 2023
kwvg added a commit to kwvg/dash that referenced this pull request Jul 23, 2023
kwvg added a commit to kwvg/dash that referenced this pull request Jul 24, 2023
kwvg added a commit to kwvg/dash that referenced this pull request Jul 28, 2023
kwvg added a commit to kwvg/dash that referenced this pull request Jul 28, 2023
kwvg added a commit to kwvg/dash that referenced this pull request Jul 30, 2023
knst pushed a commit to knst/dash that referenced this pull request Aug 1, 2023
knst pushed a commit to knst/dash that referenced this pull request Aug 1, 2023
kwvg added a commit to kwvg/dash that referenced this pull request Aug 1, 2023
kwvg added a commit to kwvg/dash that referenced this pull request Aug 1, 2023
kwvg added a commit to kwvg/dash that referenced this pull request Aug 1, 2023
PastaPastaPasta pushed a commit to kwvg/dash that referenced this pull request Aug 2, 2023
@bitcoin bitcoin locked and limited conversation to collaborators May 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants