|
ESPHome 2026.12.0-dev
|
How long sends have made no progress. More...
#include <stream_head.h>
Public Member Functions | |
| void | start (uint32_t now) |
| Starts the clock; a running clock keeps its start time. | |
| void | clear () |
| bool | is_running () const |
| bool | is_expired (uint32_t now, uint32_t timeout_ms) const |
| True once the clock has run for timeout_ms. | |
| uint32_t | elapsed (uint32_t now) const |
| bool | start_or_expired (uint32_t now, uint32_t timeout_ms) |
| Starts the clock if needed; true once it has run for timeout_ms. | |
Protected Attributes | |
| uint32_t | started_ms_ {0} |
How long sends have made no progress.
Zero means not running, so a start at millis() == 0 records 1. The comparison is wraparound safe across a millis() rollover.
Definition at line 174 of file stream_head.h.
|
inline |
Definition at line 182 of file stream_head.h.
Definition at line 188 of file stream_head.h.
|
inline |
True once the clock has run for timeout_ms.
Definition at line 185 of file stream_head.h.
|
inline |
Definition at line 183 of file stream_head.h.
|
inline |
Starts the clock; a running clock keeps its start time.
Definition at line 177 of file stream_head.h.
|
inline |
Starts the clock if needed; true once it has run for timeout_ms.
Definition at line 190 of file stream_head.h.
|
protected |
Definition at line 196 of file stream_head.h.