MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / MillisToTimeval

Function MillisToTimeval

src/netbase.cpp:233–239  ·  view source on GitHub ↗

* Convert milliseconds to a struct timeval for select. */

Source from the content-addressed store, hash-verified

231 * Convert milliseconds to a struct timeval for select.
232 */
233struct timeval static MillisToTimeval(int64_t nTimeout)
234{
235 struct timeval timeout;
236 timeout.tv_sec = nTimeout / 1000;
237 timeout.tv_usec = (nTimeout % 1000) * 1000;
238 return timeout;
239}
240
241/**
242 * Read bytes from socket. This will either read the full number of bytes requested

Callers 2

InterruptibleRecvFunction · 0.85
ConnectSocketDirectlyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected