#include "NimBLEDevice.h"
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println(esp_timer_get_time());
delay_ms(2000);
Serial.println(HELLO);
}
void delay_ms(uint64_t ms) {
uint64_t m = esp_timer_get_time();
if(ms){
uint64_t e = (m + (ms * 1000));
if(m > e){ //overflow
while(esp_timer_get_time() > e) { }
}
while(esp_timer_get_time() < e) {}
}
}
Loading
esp32-c3-devkitm-1
esp32-c3-devkitm-1