7#include <core_esp8266_features.h>
10#include <user_interface.h>
36static constexpr uint32_t MILLIS_RARE_PATH_THRESHOLD_US = 10000;
37static constexpr uint32_t US_PER_MS = 1000;
50 state.last_us = now_us;
51 state.remainder += delta;
52 if (
state.remainder >= MILLIS_RARE_PATH_THRESHOLD_US) {
59 state.remainder -= ms * US_PER_MS;
64 while (
state.remainder >= US_PER_MS) {
66 state.remainder -= US_PER_MS;
84 optimistic_yield(1000);
88 while (
millis() - start < ms) {
89 optimistic_yield(1000);
uint32_t IRAM_ATTR __wrap_millis()
void HOT delay(uint32_t ms)
uint32_t IRAM_ATTR HOT millis()