26 clock_gettime(CLOCK_MONOTONIC, &spec);
27 return static_cast<uint32_t>(spec.tv_sec * 1000ULL + spec.tv_nsec / 1000000);
31 clock_gettime(CLOCK_MONOTONIC, &spec);
32 return static_cast<uint64_t
>(spec.tv_sec) * 1000ULL +
static_cast<uint64_t
>(spec.tv_nsec) / 1000000ULL;
36 ts.tv_sec = ms / 1000;
37 ts.tv_nsec = (ms % 1000) * 1000000;
40 res = nanosleep(&ts, &ts);
41 }
while (res != 0 && errno == EINTR);
45 clock_gettime(CLOCK_MONOTONIC, &spec);
46 return static_cast<uint32_t>(spec.tv_sec * 1000000ULL + spec.tv_nsec / 1000);
50 ts.tv_sec = us / 1000000U;
51 ts.tv_nsec = (us % 1000000U) * 1000U;
54 res = nanosleep(&ts, &ts);
55 }
while (res != 0 && errno == EINTR);
61 if (argv !=
nullptr) {
64 ESP_LOGE(
"host",
"execv('%s') failed: %s", target, std::strerror(errno));
73 clock_gettime(CLOCK_MONOTONIC, &spec);
74 time_t seconds = spec.tv_sec;
76 return static_cast<uint32_t>(seconds) * 1000000000U + ns;
const char * get_reexec_path()
Armed re-exec path, or nullptr.
char ** get_argv()
argv captured by main(); stable for process lifetime.
uint32_t arch_get_cpu_cycle_count()
void IRAM_ATTR HOT delayMicroseconds(uint32_t us)
uint32_t IRAM_ATTR HOT micros()
void HOT delay(uint32_t ms)
uint32_t IRAM_ATTR HOT millis()