如何在iPhone之间准确同步时间? [英] How to accurately sync time between iPhones?

查看:213
本文介绍了如何在iPhone之间准确同步时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个应用程序,要求我准确地同步大量iPhone上的时间(在几分之一秒内)。据我所知,无法访问GPS的时间功能。如果我通过Internet同步,那么最大的问题是网络延迟。收到回复请求之前的延迟估计可以是往返的一半 - 但我可以预期这个有多准确?是否值得发送多个请求和平均值,还是有另一种更好的同步时间方法?

I am writing an application that will require me to sync the time on a large number of iPhones accurately (to within a fraction of a second). As far as I can tell, access to the time function of the GPS is not available. If I sync over the Internet, then the biggest problem is network latency. The delay before the answer to a request is received can be estimated to be half the round trip - but how accurate can I expect this to be? Would it be worthwhile sending multiple requests and averaging or is there another better way of synchronising time?

推荐答案

尝试实现 Marzullo的算法,特别用于 NTP

这篇关于如何在iPhone之间准确同步时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆