MCPcopy Create free account
hub / github.com/FastLED/FastLED / shouldSendHeartbeat

Method shouldSendHeartbeat

src/fl/stl/asio/http/connection.cpp.hpp:112–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112bool HttpConnection::shouldSendHeartbeat(u32 currentTimeMs) const {
113 if (mState != ConnectionState::CONNECTED) {
114 return false; // Only send heartbeats when connected
115 }
116
117 // Check if enough time has passed since last heartbeat
118 u32 timeSinceLastHeartbeat = currentTimeMs - mLastHeartbeatSentMs;
119 return timeSinceLastHeartbeat >= mConfig.heartbeatIntervalMs;
120}
121
122void HttpConnection::update(u32 currentTimeMs) {
123 // Check for timeout first (before updating timestamps)

Callers 2

FL_TEST_FILEFunction · 0.45
FL_TEST_FILEFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected