HomePhabricator

net: move MillisToTimeval() from netbase to util/time

Description

net: move MillisToTimeval() from netbase to util/time

Summary:
Move MillisToTimeval() from netbase.{h,cpp} to
src/util/system.{h,cpp}.

This is necessary in order to use MillisToTimeval() from a newly
introduced src/util/sock.{h,cpp} which cannot depend on netbase
because netbase will depend on it.

This is a backport of [[https://github.com/bitcoin/bitcoin/pull/20788 | core#20788]] [1/5]
https://github.com/bitcoin/bitcoin/pull/20788/commits/aa17a44551c03b00a47854438afe9f2f89b6ea74

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Vasil Dimov <vd@FreeBSD.org>Authored on Jan 4 2021, 12:14
PiRKCommitted on Feb 8 2022, 13:41
PiRKPushed on Feb 8 2022, 13:41
Reviewer
Restricted Project
Differential Revision
D11003: net: move MillisToTimeval() from netbase to util/time
Parents
rABCc43edc8b5144: Move the add_outbounds helper to the test object in p2p_add_connections.py
Branches
Unknown
Tags
Unknown