http://qs321.pair.com?node_id=1176727


in reply to Re: Logical ways to calculate being within two times
in thread Logical ways to calculate being within two times

One possible caveat of the epoch time calculation.

If you set a time that happens to coincide to the minute, with the subtraction of a leap second, then the until loop may never terminate.

The solution is to add 30 rather than 60 each iteration.

Of course, if your processor doesn't use NTP or some similar method to synchronise its system clock, the problem is probably moot.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice.