I'm using an RTC DS3231 and with that the RTClib.h Library by Adafruit.
My problem is that I need to compare two Timestamp objects(Meaning produce a Timestamp in the past and when the time comes, compare it two the current Time)
I need the difference in Time in any one unit(minutes, seconds) doesn’t really matter, would prefer minutes though, to calculate with that number.
E.g.: at 18:00:05 on 01.01.2020(DD.MM.YYYY) I created a Timestamp and at 19:00:00 on the 02.01.2020 I want to know the time passed from the given Timestamp on out. The value that I need would be something like 1499 because 1499 minutes passed between these timestamps.
How would I do this? are there any functions like:
difference(minutes, Timestamp1, Timestamp2)
also: will the Arduino save these Timestamp objects for when it has no power? The RTC has a separate battery.
E.g.: The Arduino has power and runs the program. It stores 3 different Timestamps and I turn the power off. When I turn the power on again, will I be able to use these Timestamps again?