Page MenuHomePhabricator

rpc: Use steady_clock for getrpcinfo durations
ClosedPublic

Authored by PiRK on Jan 5 2024, 08:35.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC7d2c38b88ebe: 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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable