PlatformIO Community

How to add #include <esp32-hal-time.h>

Hi I am working with esp32 with platformio…

From a .cpp file under the lib folder how can I include the following header file ?

#include <esp32-hal-time.h>

Thanks a lot

That should already be correct – is there an error after doing an IntelliSense rebuild (Ctrl+Shift+P → Intelli)?

Adding the following include

#include <esp32-hal-time.c>

#include <esp32-hal-time.c>

and then calling the following function

getLocalTime(&time_test);

causes the crash of the firmware…

But compiling i don’t have issues…

Can you tell me why Max ?

Thanks

Sorry I measread the header file name (timer instead of time).

The functions should be available when just using

#include <Arduino.h>
#include <time.h> 

does that work better?

If not, post the full code.

I can especially recomment just using this piece of code