HomePhabricator

[avalanche] Use SteadyMilliseconds where possible

Description

[avalanche] Use SteadyMilliseconds where possible

Summary:
std::chrono::time_point<std::chrono::steady_clock> is a mouthful and doesn't hint about the expected resolution. Use SteadyMilliseconds where due instead as this is already available in our time.h header.
The Now() function is made constexpr to make sure there is no performance cost over using the standard now() function.

There is no change in behavior.

Depends on D14553.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D14554

Details

Provenance
FabienAuthored on Sep 28 2023, 12:27
FabienPushed on Sep 28 2023, 15:29
Reviewer
Restricted Project
Differential Revision
D14554: [avalanche] Use SteadyMilliseconds where possible
Parents
rABC045f47d2a448: [avalanche] Rename CNode's last_poll member to m_last_poll
Branches
Unknown
Tags
Unknown
Reverted By
D14558: Revert "[avalanche] Use SteadyMilliseconds where possible"