ESP32 documentaiont for "time.h"
time.h is provided by the compiler (more specifically the C library in use in the compiler).

I believe the xtensa-esp32 compiler uses newlib as the C library. If that is the case, the documentation is here: https://sourceware.org/newlib/libc.html#Timefns