Page 1 of 1

How do you know when sntp_int returns andd if it has a valid date/time?

Posted: Fri Jan 05, 2018 1:47 am
by Tranzmetro
All examples I have seen for using sntp_init use a test on the year to determine if there is a valid date, but what happens if you use sntp_init each day to check the date/time, any difference will likely only be minutes or seconds so any test using the year will say that the date/time will be correct even when it may not be. I'm a noob so I may have missed something obvious but how do you know if when sntp_init returns and if it has a valid date? The best that I can think of is using a long delay after calling sntp_init and hope. Thanks.