Skip to content

Commit c216a45

Browse files
committed
ESP32 as component provide micros()
1 parent 0c2714b commit c216a45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AudioTools/AudioRuntime.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#include "../AudioConfig.h"
44

5+
56
#if defined(ESP32_CMAKE)
67
#include "freertos/FreeRTOS.h"
78
#include "freertos/task.h"
@@ -11,8 +12,7 @@
1112
inline void delay(uint32_t ms){ vTaskDelay(ms / portTICK_PERIOD_MS);}
1213
inline uint32_t millis() {return (xTaskGetTickCount() * portTICK_PERIOD_MS);}
1314
inline void delayMicroseconds(uint32_t ms) {esp_rom_delay_us(ms);}
14-
//inline uint64_t micros() { return xTaskGetTickCount();}
15-
// extern uint64_t micros();
15+
inline uint64_t micros() { return xTaskGetTickCount() * portTICK_PERIOD_MS * 1000;}
1616

1717
#endif
1818

0 commit comments

Comments
 (0)