MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / receivedDataRecently

Method receivedDataRecently

src/openrct2/network/NetworkConnection.cpp:232–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230 }
231
232 bool Connection::receivedDataRecently() const noexcept
233 {
234 constexpr auto kTimeoutMs = kNoDataTimeout * 1000;
235
236 const auto timeSinceLastRecv = Platform::GetTicks() - _lastReceiveTime;
237 if (timeSinceLastRecv > kTimeoutMs)
238 {
239 return false;
240 }
241
242 return true;
243 }
244
245 const utf8* Connection::getLastDisconnectReason() const noexcept
246 {

Callers 1

ProcessConnectionMethod · 0.80

Calls 1

GetTicksFunction · 0.85

Tested by

no test coverage detected