I want to synchronize the time with NTP over JavaScript. The client can be a normal pc or a smartphone or tablet. The connection could be WLAN or 3G, etc.
I already found this questions and sites
- how to get ntp time from through javascript
- JavaScript NTP time
- http://jehiah.cz/a/ntp-for-javascript
- Synchronize time in javascript with a good precision (>0.5s) (NTP-like)
first and second links using the a timestamp from this server: http://json-time.appspot.com/time.json
But the date object has only second precision. I want a better precision, if possible ~ 10 ms. (I know the precision depends on the connection and round trip time)
Edit: 10 ms is almost impossible. I want the most precision offset.
The third link shows a JavaScript library, but it does not use a direct connection to a ntp server. The solution of the fourth link is most near to that what I want. But its for synchronizing two clients through a 'own' server. Is there a way to synchronize it directly to a ntp pool like pool.ntp.org
?