Report Bugs Here

Moderator: Mmiscool

User avatar
By peridot
#36138 I was obtaining NTP time periodically and I found that when I disconnected my WAN from my network ie. NO Internet I was still obtaining an incrementing time from time(), how can this be? Now I am not sure what I am looking at?
User avatar
By TassyJim
#36139 I think I have it right this time.

The module uses NTP to set it's clock when it first starts up and connects to the internet and also when ever you run the timesetup() command.
In between time, it uses an internal clock to keep the time. It may also run NTP periodical but I haven't seen that happen after monitoring my module for a few hours.

I am not sure how precise the internal clock is.

Jim
User avatar
By peridot
#36142 Jim, thanks for that..
Oh Oh dear , Yes that was exactly the conclusion I was coming to but I did not want to say it, Claytons NTP unfortunately. I came across it only because I was looking for a way to tell if the internet was live or not (in code) , the usual trick is to request a page from somewhere like Google and look for a failed connection but I couldn't get that to work with wget() so then I thought ah ah I will use an NTP check and imagine my surprise when I still got the time!
OK I will look for other solutions.

Mike