#include "port.h" #include "esp_log.h" uint32_t port_get_ticket() { return esp_log_timestamp(); } uint32_t port_haspassedms(uint32_t ticket) { return port_get_ticket() - ticket; } uint32_t port_delay_ms(uint32_t ms) { uint32_t now = port_get_ticket(); while (port_get_ticket() - now < ms) { } }