HomePhabricator

rpc: Use steady_clock for getrpcinfo durations

Description

rpc: Use steady_clock for getrpcinfo durations

Summary:
Currently it uses GetTimeMicros, which is the system time. Using steady time instead, makes the code type safe and avoids spurious offsets when the system time adjusts.

This is a backport of core#25456

The Tick helper is a dependency for future backports (starting with core#25717)

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
MacroFake <falke.marco@gmail.com>Authored on Jun 23 2022, 13:51
PiRKCommitted on Jan 5 2024, 10:51
PiRKPushed on Jan 5 2024, 10:51
Reviewer
Restricted Project
Differential Revision
D15085: rpc: Use steady_clock for getrpcinfo durations
Parents
rABC79026e75747f: [Chronik] Add `TokenWriter` and `TokenReader`
Branches
Unknown
Tags
Unknown