Closed ph1lj-6321 closed 11 months ago
Please provide sample code. I will try to solve the issue.
My first thought is to check if: 1) line 88 should be commented:
def proc_response(self, pkt):
...
# Deregister callback for response
# self.ntw.registerUdp4Callback(self.client_port, None) <<< comment this
2) After delay/timeout reset client state: sntp_cli.state = 0
3) How is delay implemented? I recommend not adding delay() into main loop - so packets could be received. Add timing mechanism similar to SntpClient.init_time
variable and ctime = time.time()
.
Best Regards
Hi Using your SntpClient.py, I'm trying top sample the time at a regular time interval (say every second) - not as easy as I thought. It only graps the data once - regardless of how long a delay I use, before looping
Any thoughts ?
ph1lj