You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A call to .time() can return a large negative number which results in a rather confusing exception in .settime(). This can occur if an application issues NTP requests too frequently: see this post. I suspect there may also be other circumstances in which an NTP query returns zero.
Another problem reported in discussions is that .time() frequently times out. Clearly the timeout must be short, but this implies that on many networks timeouts will be common.
There are a number of simple fixes. One is for .time() to return an error value in either of these cases which is tested by .settime(). The latter could return a bool indicating success or failure.
The text was updated successfully, but these errors were encountered:
I dislike the ntptime module, I think it is like "how to confuse a cat" !
Probably a lot of users get KoD because they don't realize that ntptime.time() isn't time.time() ...
I wrote my version, with more strict checking about the servers reponse.
Feel free to read and use it.
Ah, you have to remove the compatibility module and the gc_collect()
The compatibility is just to use this module also on windows / linux, defining const
A call to
.time()
can return a large negative number which results in a rather confusing exception in.settime()
. This can occur if an application issues NTP requests too frequently: see this post. I suspect there may also be other circumstances in which an NTP query returns zero.Another problem reported in discussions is that
.time()
frequently times out. Clearly the timeout must be short, but this implies that on many networks timeouts will be common.There are a number of simple fixes. One is for
.time()
to return an error value in either of these cases which is tested by.settime()
. The latter could return abool
indicating success or failure.The text was updated successfully, but these errors were encountered: