Skip to content

refactor: use time helper utilities for clearer duration conversions#100

Draft
l0rinc wants to merge 2 commits intomasterfrom
time-helpers-34328
Draft

refactor: use time helper utilities for clearer duration conversions#100
l0rinc wants to merge 2 commits intomasterfrom
time-helpers-34328

Conversation

@l0rinc
Copy link
Copy Markdown
Owner

@l0rinc l0rinc commented Jan 17, 2026

Problem

While investigating bitcoin#34328, I found a few remaining duration conversions that still used direct .count() or manual division.

Fix

Switch them to the existing helpers for clarity using count_seconds,count_microseconds and Ticks.

Replace direct `.count()` uses with `count_seconds` or `count_microseconds` where the unit matters for logs and serialized timestamps.
Update `p2p_handshake` fuzz bounds to express the same seconds conversion explicitly.
@l0rinc l0rinc force-pushed the time-helpers-34328 branch from 45337d1 to 63415ed Compare January 17, 2026 22:07
Use `Ticks` in mempool tracepoints and Qt ping time formatting to avoid manual duration casts and conversions.
Update `scheduler_tests` to use `Ticks` for the remaining job delta calculation.
@l0rinc l0rinc force-pushed the time-helpers-34328 branch from 63415ed to 5c0bbbb Compare January 17, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant