[core] Add periodical free heap logging
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user