Calibration function to calibrate Millis Factor to precise timing maybe 15.9599999 Crystal precision.
So we can measure over hours in Millisecond Precision with round about 32768Hz 1-2ppm.
Most people uses the Time Library With DS3231 or gps time.. Why we synchronize Time in intervals instead reading the integrated TCX0 or PPS
If your microcontroller has WiFi I would recommend getting the exact time from the internet. Corrected for daylight saving time or not. No RTC or battery needed. The time from a RTC drifts a few seconds a month. Internet time does not.
Project is here: https://hackaday.io/project/174577-free-highly-accurate-time-and-date-from-internet
I use NodeMCU/esp8266 for WiFi functions but have ordered an Arduino Nano ESP32 for future projects.