Add time helpers for std::chrono::steady_clock and FastRandomContext::rand_uniform_delay #24921

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:2204-steady-clock-🎎 changing 4 files +42 −4
  1. MarcoFalke commented at 11:15 AM on April 19, 2022: member

    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.

  2. MarcoFalke added the label Refactoring on Apr 19, 2022
  3. MarcoFalke force-pushed on Apr 19, 2022
  4. DrahtBot commented at 5:00 PM on April 19, 2022: member

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    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.

  5. ajtowns commented at 4:24 PM on April 29, 2022: member

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

  6. MarcoFalke commented at 4:30 PM on April 29, 2022: member

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

  7. MarcoFalke force-pushed on May 8, 2022
  8. Add time helpers for std::chrono::steady_clock faa5c62967
  9. random: Add FastRandomContext::rand_uniform_delay fa4fb8d98b
  10. MarcoFalke force-pushed on May 8, 2022
  11. MarcoFalke commented at 9:49 AM on May 8, 2022: member

    Added doxygen to Now.

  12. ajtowns commented at 8:57 PM on May 9, 2022: member

    ACK fa4fb8d98b7e8e5ea2db35bf239fa7f248da5d8e

  13. MarcoFalke merged this on May 10, 2022
  14. MarcoFalke closed this on May 10, 2022

  15. MarcoFalke deleted the branch on May 10, 2022
  16. sidhujag referenced this in commit 6d91779b18 on May 10, 2022
  17. DrahtBot locked this on May 10, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 06:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me