Page MenuHomePhabricator

util: Use steady clock instead of system clock to measure durations
ClosedPublic

Authored by PiRK on Jul 15 2025, 11:44.

Details

Summary

GetTimeMillis has multiple issues:

  • It doesn't denote the underlying clock type
  • It isn't type-safe
  • It is used incorrectly in places that should use a steady clock

Fix all issues here.

refactor, qt: Use std::chrono for MODEL_UPDATE_DELAY constant

https://github.com/bitcoin-core/gui/pull/517/commits/33d520ac538fcd6285fd958578f1bd26295592e4

net: Use steady clock in InterruptibleRecv

test: Use steady clock in index tests

See D14087 for why 30s in blockfilter_index_tests

wallet: Use steady clock to measure scanning duration

wallet: Use steady clock to calculate number of derive iterations

with MillisecondsDouble from core#26118

This is a backport of core#27405 and a partial backport of core-gui#517

Test Plan

ninja all check-all

Diff Detail

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