| 270 | #endif // WSL_HIGH_PERF |
| 271 | |
| 272 | void WebSerialClass::loop() { |
| 273 | #ifndef WSL_HIGH_PERF |
| 274 | if ((unsigned long)(millis() - _last_cleanup_time) > WSL_CLEANUP_TIME_MS) { |
| 275 | _last_cleanup_time = millis(); |
| 276 | _ws->cleanupClients(WSL_MAX_WS_CLIENTS); |
| 277 | } |
| 278 | |
| 279 | // If FLUSH_TIME ms has been passed since last packet time, flush logs |
| 280 | if (_last_print_buffer_write_time != 0) { |
| 281 | if ((unsigned long)(micros() - _last_print_buffer_write_time) > WSL_PRINT_FLUSH_TIME_US) { |
| 282 | _flush_print_buffer(); |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | // If FLUSH_TIME ms has been passed since last flush time, flush logs |
| 287 | if (_last_print_buffer_flush_time != 0) { |
| 288 | if ((unsigned long)(millis() - _last_print_buffer_flush_time) > WSL_GLOBAL_FLUSH_TIME_MS) { |
| 289 | _flush_global_buffer(); |
| 290 | } |
| 291 | } |
| 292 | #endif // WSL_HIGH_PERF |
| 293 | } |
| 294 | |
| 295 | void WebSerialClass::setBuffer(size_t initialCapacity) { |
| 296 | #ifdef WSL_HIGH_PERF |
nothing calls this directly
no outgoing calls
no test coverage detected