Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clock: support network clock #883

Open
iyear opened this issue Sep 20, 2022 · 1 comment
Open

clock: support network clock #883

iyear opened this issue Sep 20, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@iyear
Copy link
Contributor

iyear commented Sep 20, 2022

Description

I want to add a basic network clock implementation that uses ntp to calibrate the time and record the offset, the Ticker and Timer implementations are the same as clock.System.

Note: will import new mod: https://github.com/beevik/ntp

Add it in gotd/td or in gotd/contrib?

References

https://core.telegram.org/mtproto#time-synchronization

Having received such a message or a container holding it, the client first performs a time synchronization (in effect, simply storing the difference between the server's time and its own to be able to compute the “correct” time in the future) and then verifies that the message identifiers for correctness.

@iyear iyear added the enhancement New feature or request label Sep 20, 2022
@ernado
Copy link
Member

ernado commented Sep 20, 2022

Actually, Time can be calibrated from mtproto server, so no ntp server is required.

I think that ntp-based solution should be in contrib, and mtproto-based can be in main repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants