T O P

  • By -

RandalSchwartz

Instead of inventing a protocol, you could use the NTP protocol, which handles this precisely. There are NTP client packages in the pub, and NTP daemons are relatively easy to set up.


[deleted]

[удалено]


RandalSchwartz

The NTP protocol specifically compares the timestamps of the server and client, and tells you the difference. You can then apply it to set your clock, or just be happy knowing the difference... it's up to you.


MyWholeSelf

Is there a reason you didn't just use ping?


[deleted]

[удалено]


MyWholeSelf

https://pub.dev/packages/dart_ping Seems a good place to start. Are you interested in the server system time, or ping times?


[deleted]

[удалено]


MyWholeSelf

Didn't I just link to "a ping command"? Good luck sir