MCPcopy Create free account
hub / github.com/boostorg/asio / timeout

Method timeout

include/boost/asio/basic_socket_streambuf.hpp:449–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

447 }
448
449 int timeout() const
450 {
451 int64_t msec = traits_helper::to_posix_duration(
452 traits_helper::subtract(expiry_time_,
453 traits_helper::now())).total_milliseconds();
454 if (msec > (std::numeric_limits<int>::max)())
455 msec = (std::numeric_limits<int>::max)();
456 else if (msec < 0)
457 msec = 0;
458 return static_cast<int>(msec);
459 }
460
461 template <typename EndpointSequence>
462 void connect_to_endpoints(const EndpointSequence& endpoints)

Callers 1

testFunction · 0.80

Calls 4

to_posix_durationFunction · 0.85
subtractFunction · 0.85
total_millisecondsMethod · 0.80
nowFunction · 0.70

Tested by

no test coverage detected