Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Apr 19, 2022

A steady clock can be used in the future for the scheduler, for example.

A random uniform delay applied to a time point can be used in the future for time points passed to the scheduler, or delays in net processing.

Currently they are unused outside of tests, but if they turn out unused in the future (unlikely), they can trivially be removed again. I am splitting them out, so that several branches/pulls can build on top of them without duplicating the commits.

@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 19, 2022

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #24974 (refactor: Make FEELER_SLEEP_WINDOW type safe (std::chrono) by MarcoFalke)
  • #24697 (refactor address relay time by MarcoFalke)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@ajtowns
Copy link
Contributor

ajtowns commented Apr 29, 2022

Concept ACK. I'm lost as to which time PR to look at first at this point, fwiw.

@maflcko
Copy link
Member Author

maflcko commented Apr 29, 2022

I think we need both, but this one is blocking the addr relay refactor, so review here is minimally more appreciated.

@maflcko maflcko force-pushed the 2204-steady-clock- branch from fa8da21 to fada593 Compare May 8, 2022 09:42
@maflcko maflcko force-pushed the 2204-steady-clock- branch from fada593 to fa4fb8d Compare May 8, 2022 09:48
@maflcko
Copy link
Member Author

maflcko commented May 8, 2022

Added doxygen to Now.

@ajtowns
Copy link
Contributor

ajtowns commented May 9, 2022

ACK fa4fb8d

@maflcko maflcko merged commit fb7c12c into bitcoin:master May 10, 2022
@maflcko maflcko deleted the 2204-steady-clock-🎎 branch May 10, 2022 05:59
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request May 10, 2022
…nd FastRandomContext::rand_uniform_delay

fa4fb8d random: Add FastRandomContext::rand_uniform_delay (MarcoFalke)
faa5c62 Add time helpers for std::chrono::steady_clock (MarcoFalke)

Pull request description:

  A steady clock can be used in the future for the scheduler, for example.

  A random uniform delay applied to a time point can be used in the future for time points passed to the scheduler, or delays in net processing.

  Currently they are unused outside of tests, but if they turn out unused in the future (unlikely), they can trivially be removed again. I am splitting them out, so that several branches/pulls can build on top of them without duplicating the commits.

ACKs for top commit:
  ajtowns:
    ACK fa4fb8d

Tree-SHA512: 2c37174468fe84b1cdf2a032f458706df44b99a5f99062417bb42078b6f69e2f1738d20c21cd9386ca5a35f3bc0583e547ba40168c66f6aa42f700ba35dd95d4
@bitcoin bitcoin locked and limited conversation to collaborators May 10, 2023
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.

3 participants