Hello,
I'm really glad you came up with that question. First, this is the first version and is intended to prove the concept and test the counting logic.
At the time I thought about the typical Arduino user that will ask for the time more times than once per second (taking lots of resources for the calculation) but also trying to maintain some standard by using (a somewhat modified) the struct tm
But then started thinking about making the ISR to count seconds (and implement now()), and hit the first wall. The AVR-libc doesn't come with a time.h and after going through the time.h lib from newlib, I think that most of the logic might be overkill for an AVR and depending on how the library is used ending up taking more system resources than the time counting code I have now.
On the other hand, because time.h is not standard in the AVR-libc, some of the fields in the struct tm are "useless" as there is no simple way (unless implementing time.h functions) to confirm or calculate the values. The day of year is one of such variables.
So the last conclusion I took was to cut the fat from the actual version (leaving year, month, day, hours, minutes and seconds) and create another version of the library (or even within the same) to just implement the counting of seconds.
What is your opinion about the best structure?
I came up with this while thinking out loud about a binary clock, so my concern then was merely hours and minutes and trying to do this with the least amount of resources so I could put the controller to sleep and run it at 1MHz.