I have a timer with start time hour and minute that i want to add a fixed interval hour without overflowing past 24 hours, is there any examples available on how to do this?
You might elaborate a bit what you exactly mean.
Also are you working with epoch time or with a human readable time representation (h:m:s)?
When doing calculations with times and dates then I’d always advise to go with epoch time (or similar schemes).
Another function to look into in this respect is modulo (%)
(18 + 10) % 24 = 4
2 Likes
Perfect. That’s what i wanted to know, since constrain wasn’t working.
Thank you!