[core] Add periodical free heap logging

This commit is contained in:
Kuba Szczodrzyński
2022-08-31 22:26:12 +02:00
parent 3f588e970a
commit 755c2ef400

View File

@@ -26,7 +26,15 @@ unsigned long micros() {
return millis() * 1000;
}
static unsigned long lastHeapLog = 0;
void yield() {
#if LT_LOG_HEAP
if (millis() - lastHeapLog > 1000) {
LT_HEAP_I();
lastHeapLog = millis();
}
#endif
vTaskDelay(1);
taskYIELD();
}