On Wed, Jul 27, 2016 at 06:55:52PM +0800, Jason McVetta wrote:
On Wed, Jul 27, 2016 at 3:58 PM, Georgi Guninski <guninski@guninski.com> wrote:
Getting very good approximation of system time from a browser is not very trivial, but likely writing something like NTP in javascript is doable.
Haven't tried it, but this JS library claims to return microsecond-resolution system time in a vareity of browsers: https://github.com/medikoo/microtime-x
Thanks. I don't think this library is enough. AFAICT, the lib gives you high precision time _in the browser_, but this is not enough for the question. To get it, you use the network which is of unknown latency (unless you sniff it). To get the system time you must know: 1. When you got the time 2. When you received the time Something like Eisenstein's theory about impossibility to synchronize clocks with super-light speed. Sometimes I wonder what is so special about the speed of light and if humans were blind per design and didn't know what light is, would they replace "speed of light with 'speed of fastest thing they can measure", explaining relativity with "the fast thing slows down near `matter'" ;) (this paragraph is just trolling).