In my example, while loop in main.c seems working in 1.437ms period
and I need some calculation in us.
Code: Select all
int64_t oldTime, currentTime;
int16_t deltaTime;
while(1) {
oldTime = currentTime;
currentTime = esp_timer_get_time();
deltaTime = currentTime - oldTime;
printf("deltaTime: %d\n", deltaTime); // deltaTime = 1437
}
Regards,