SensESP 3.6.1-alpha
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
signalk_ws_connect_due.h
Go to the documentation of this file.
1#ifndef SENSESP_SRC_SENSESP_SIGNALK_SIGNALK_WS_CONNECT_DUE_H_
2#define SENSESP_SRC_SENSESP_SIGNALK_SIGNALK_WS_CONNECT_DUE_H_
3
4#include <cstdint>
5
6namespace sensesp {
7
19inline bool sk_connect_due(uint32_t now_ms, uint32_t last_attempt_ms,
20 uint32_t wait_ms) {
21 return now_ms - last_attempt_ms >= wait_ms;
22}
23
24} // namespace sensesp
25
26#endif // SENSESP_SRC_SENSESP_SIGNALK_SIGNALK_WS_CONNECT_DUE_H_
bool sk_connect_due(uint32_t now_ms, uint32_t last_attempt_ms, uint32_t wait_ms)
True if the next Signal K connection attempt is due.