I have looked at several examples and they do not address the issue of converting millis() in to hours, minutes and seconds, it also raises the question of why these values are not directly addressable as values automatically available like they are in JS.
this is a close approximation of an example on this Arduino forum that doesn't work, I know I tried it and it throws errors about String and char * and other issues about int when not throwing up issues of String and char *
An example error message timemachine1_cpp.ino: In function ‘void loop()’: timemachine1_cpp.ino:48:79: error: cannot convert ‘StringSumHelper’ to ‘char*’ in initialization
Can someone point me to an actual known working example that converts millis() to their respective elements and then formats a string for output to the serial monitor please.
For example, when button A is pressed, only a timer count from millis() to variable for timerA is counted, when button B is pressed... ... When button C is pressed ... ...
The actual time is irrelevant, I was looking for a time conversion for serial output only that wasn't in millis() but a more human readable format.
Libraries don't work that way. When you include a library, only the parts that you use directly, ever contribute to the machine code size. In fact, if you include it, and only use its definitions, it won't even add a single byte of additional machine code.
I showed you the other way to do it. Why not give it a try and post your solution?
Sometime in the future, its baby steps for me, last time I programmed in C was back in 1985 and then it was Delphi C, I got to get my head in to the syntax again, I have been using PHP and JavaScript for 20 years so its like having to learn a new programming language all over again.
When the prototype has been thoroughly tested I will Github it.
The JeeLabs/Adafruit fork RTC library does offer an all in one text string function similar to what you asked for. Here is a line from my code that uses it:
Perhaps you just need to get used to the absence of many high level functions from your Delphi etc. environments. This is a small memory, small footprint, minimal or no OS environment.
The code you alread posted creates variables that you can easily convert to a text string using snprintf().