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

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 commit is contained in:
Vasil Dimov
2021-01-04 13:14:32 +01:00
parent 29d2aeb4a2
commit aa17a44551
5 changed files with 18 additions and 12 deletions

View File

@@ -62,10 +62,6 @@ bool CloseSocket(SOCKET& hSocket);
bool SetSocketNonBlocking(const SOCKET& hSocket, bool fNonBlocking);
/** Set the TCP_NODELAY flag on a socket */
bool SetSocketNoDelay(const SOCKET& hSocket);
/**
* Convert milliseconds to a struct timeval for e.g. select.
*/
struct timeval MillisToTimeval(int64_t nTimeout);
void InterruptSocks5(bool interrupt);
#endif // BITCOIN_NETBASE_H