Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Countdown stops and how to repeat after a long period #30

Open
evermore99 opened this issue Feb 3, 2021 · 8 comments
Open

Countdown stops and how to repeat after a long period #30

evermore99 opened this issue Feb 3, 2021 · 8 comments

Comments

@evermore99
Copy link

Dear Andrew, thanks for the great library!

Could you add days into the program or what is the limit to the amount of hours? And how do I make the code repeat after 36:00:00 ?

I’ll like to integrate this in the library. Is such a thing possible?

many thanks for taking your time reading this.

best regards

Bastiaan

@AndrewMascolo
Copy link
Owner

AndrewMascolo commented Feb 3, 2021 via email

@evermore99
Copy link
Author

evermore99 commented Feb 4, 2021 via email

@AndrewMascolo
Copy link
Owner

Hi, it’s definitely possible to add days to this library but that would require a rewrite of the logic. Right now you can only set the timer for about 18 hours as that is the largest value that can be stored in a 32bit unsigned integer. The hours minutes and seconds are all converted into seconds and then decremented. If I were to add days, this would need to be changed, which can also impact precision. Although if you need precision then I would advise getting a Real Time Clock module instead. This way you keep precision and keep the rest of your code running smoothly.

I will play around with the library over the weekend and add in days.

@evermore99
Copy link
Author

evermore99 commented Feb 4, 2021 via email

@AndrewMascolo
Copy link
Owner

Added Days

@evermore99
Copy link
Author

evermore99 commented Feb 7, 2021 via email

@evermore99
Copy link
Author

evermore99 commented Feb 8, 2021 via email

@AndrewMascolo
Copy link
Owner

AndrewMascolo commented Feb 8, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants