laptophead
Well-known member
I am putting together a downtime tracking device for an industrial application.
THe time is arbitrary and it starts with the reset button or powering up. TimeLib.h does a nice job to avoid rolling millis and it displays correctly the time elapsed since the start of the processor.
However, my application requires that I show hours from 0 to 99. The trouble is that TimeLib.h will roll hours in days after 24hrs as normal.
I wonder if I could customize it to show just minutes and hours up to 99 hrs. There is very little reference on it.
If you have another algorithm that will convert millis in min and hours, I am all ears.
Thanks
Mitch
I use now
tft.setTextSize(4);
tft.print(hour());
tft.print(" ");
tft.print(minute());
tft.print(" ");
tft.print(second());
THe time is arbitrary and it starts with the reset button or powering up. TimeLib.h does a nice job to avoid rolling millis and it displays correctly the time elapsed since the start of the processor.
However, my application requires that I show hours from 0 to 99. The trouble is that TimeLib.h will roll hours in days after 24hrs as normal.
I wonder if I could customize it to show just minutes and hours up to 99 hrs. There is very little reference on it.
If you have another algorithm that will convert millis in min and hours, I am all ears.
Thanks
Mitch
I use now
tft.setTextSize(4);
tft.print(hour());
tft.print(" ");
tft.print(minute());
tft.print(" ");
tft.print(second());