MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / hasTimedOut

Method hasTimedOut

src/OpenLoco/src/Network/NetworkConnection.cpp:27–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27bool NetworkConnection::hasTimedOut() const
28{
29 auto durationSinceLastPacket = getTime() - _timeOfLastReceivedPacket;
30 if (durationSinceLastPacket > kConnectionTimeout)
31 {
32 return true;
33 }
34 return false;
35}
36
37void NetworkConnection::update()
38{

Callers

nothing calls this directly

Calls 1

getTimeFunction · 0.50

Tested by

no test coverage detected