B4R Question how to do MCU real time calculations in B4R ?

peacemaker

Expert
Licensed User
Longtime User
HI, all

If the device has a real-time clock IC (say, like DS1307), it's known the year = 1...99, month = 1...12, day = 1... 31, hour, min, second.

ULong (4 bytes) 0 - 4,294,967,295 B4R specific.
Unix second timestamp 4294967295 will be ... in 81 years: Sun Feb 07 2106 06:28:15 GMT+0000
For time calculations in seconds it can be enough.

But maybe is there more universal way in B4R to calculate real-time variables ?
How to store the second based timestamps ?

p.s. now i'm trying to calculate the minute based timestamp within 4-byte UInt counter.
 
Last edited:

peacemaker

Expert
Licensed User
Longtime User
Thanks for prompt.
But software RTC is not needed as the hardware one is here.

And TimeTools:
1) it requires the Internet connection, is it OK offline ?
2) and again based on UInt timestamp, that is ... not forever in B4R
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…