I am making a 6 digit 7-segment display to make a clock that shows hours, minutes, and seconds (and maybe more later). The 7-segments of each digit are made from scratch, with each segment consisting of 3 LEDs and controlled by a shift register output.
I'm trying to figure out the best and most precise way to code the clock but I'm unsure on what method to use. I understand that I can use the Time library
to obtain the current time without any external hardware, but I assume that calling the Time library functions every second to obtain the current time is not very efficient. In that case, would the best approach be to obtain the current time at startup of the clock, and then from there use the internal timer to increment that time every second? (and also minutes and hours when appropriate)
Also, I am concerned about synchronization errors, such as if I use timer interrupts that disrupt the code that actually lights up the segments to the appropriate digits. Is this a valid concern and what can I do to make sure the display keeps up with the current time?
EDIT: Please feel free to move this topic if it's in the wrong section