You can use a non-blocking way to do the reading instead so your program does not stop there for 2seconds.
You can use the RTC library to check the timing when the Core 1st started/restart to see the time. So you are not relying on the time you flashed the code or restart but the actual time of the day itself