医美代码重构
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

13 lines
316 B

#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) {
}
return 0;
}