(07-22-2020, 04:27 PM)DMSIuser78 Wrote: What if you send a ping to the server from the client and store the time it takes to respond into a variable, followed by a request for the current time on the server? Compare the time it sends back + the ping response time to the current client time and make adjustments to the client nonce value accordingly.
Might also need to take into account the processing time needed to do the ping and time comparison into this adjustment.
Wow cool. I'm getting feedback on my technical issues!
I'm not sure that I fully grasp your suggestion but what I'm understanding from it, it would essentially be trying to reinvent NTP into my software.
From a philosophical point of view, that doesn't sound the wisest approach to go in that direction. There is nothing that I could come up with that could be as good and as robust as the real thing on top of being a distraction to my real goal and a timewaster.
The farther that I would go in that direction may be to create a CRON job that monitor weekly or daily the clock synchronization of the machine that I'm not the admin and send myself an email when the drift is higher than some threshold.
I guess that I could tolerate 10ms or so....
Update: Now I fully understand your suggestion. Yes that would work but that would add a lot of complexity that is essentially a workaround. The root cause is that one of the machine clock isn't synchronized. I feel like simply making sure that the machine clock remains synchronized be a simpler and superior solution.